From 3c868fd6d12aa5fa23f81fdfb48de01be5758a59 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Sat, 10 Apr 1999 08:09:32 +0000 Subject: [PATCH] A little test file showing off how to switch skins. --- xpfe/browser/src/skindemo.xul | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 xpfe/browser/src/skindemo.xul diff --git a/xpfe/browser/src/skindemo.xul b/xpfe/browser/src/skindemo.xul new file mode 100644 index 00000000000..d050ba15887 --- /dev/null +++ b/xpfe/browser/src/skindemo.xul @@ -0,0 +1,49 @@ + + + + + + + + + +function applySkin(url) +{ + dump("Retrieving data source.\n"); + var ds = document.rdf.GetDataSource("rdf:chrome"); + + dump("Getting the source.\n"); + var s = document.rdf.GetResource("chrome://navigator/skin/"); + + dump("Getting the property.\n"); + var p = document.rdf.GetResource("http://chrome.mozilla.org/rdf#main"); + + dump("Getting the original target.\n"); + var originalTarget = ds.GetTarget(s, p, true); + + dump("Doing the unassert.\n"); + ds.Unassert(s, p, originalTarget); + + dump("Getting the literal.\n"); + var newTarget = document.rdf.GetLiteral(url); + + dump("Doing the assert.\n"); + ds.Assert(s, p, newTarget, true); + + ds.Flush(); + dump("Loading the new chrome.\n"); + window.top.location.href = "chrome://navigator/content/"; +} + + + + Click to switch to MozillaZine skin. + + + + Click to switch to default skin. + + + +