mozdev.org

JSLib
Page Updated: December 22, 2005
Latest Version: 0.1.375
Debug | Install | File I/O | RDF | Network | Sound | Utils | XUL | Zip
Home | Mailing List | Install | Source Code | Downloads | Bugs | docs | clients
STATUS: In Flux

ChromeFile

Function List Example:
js> include(jslib_chromefile);
0
js> var cf = new ChromeFile("chrome://jslib/content/");
js> cf.chromePath;
chrome://jslib/content/
js> cf.urlPath;
resource:/chrome/jslib/jslib.xul
js> cf.localPath;
/backups/binaries/moz_1.7.12/mozilla/chrome/jslib/jslib.xul
js> cf.size;
1039
js> cf.isJarFile;
false
js> cf.exists();
true
js> cf.nsIFile;
[xpconnect wrapped nsIFile]
js> cf.File;
[object Object]
js> cf.nsIZipReader;
null
js> cf.Zip;
null
js> cf.copy("/tmp/chromeFileCopied.xul");
0
js> cf.open();
0
js> cf.read();
<?xml version="1.0"?>

<!DOCTYPE window>

<window
id="jslib-launcher"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="Launch jsLib"
onload="launchSplash();">

<script type="application/x-javascript">
<![CDATA[

jslib.init(this);
include(jslib_window);

function launchSplash ()
{
if (window.arguments && window.arguments[0] != "") {
var relPath = window.arguments[0];

switch (relPath)
{
case "about":
relPath = "jslib/content/aboutDialog.xul";
break;

case "version":
jslibLaunchSplash();
return closeWin();
}

var win = new CommonWindow(JS_LIB_PATH+relPath, 350, 300);
win.position = JS_MIDDLE_CENTER;
win.open();
} else {
jslibLaunchSplash();
}

closeWin();
}

function closeWin ()
{
if (content || _content ) return;

setTimeout("close()", 1000);
}

]]>
</script>

<vbox id="appcontent" flex="100%">
<description> </description>
</vbox>

</window>

js> cf.close();
0
js> quit();

 <br>

The jslib project can be contacted through the mailing list or the member list.
Copyright © 2000-2017. All rights reserved. Terms of Use & Privacy Policy.