mozdev.org

JSLib
Page Updated: April 24, 2003
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

CommonWindow

Files:
commonWindow.js

Include name:
jslib_window

Status:
In Flux

Description:
This is a class to make it easier to produce simple windows, splash screens, web top windows.

Here is some code you can paste into your app to create a test webtop window:

<?xml version="1.0"?> <!DOCTYPE window> <window id="webtop mode" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="chrome://jslib/content/jslib.js" /> <script> include (jslib_window); const URL = 'chrome://jslib/content/samples/webtop_sample.xul'; var win = new CommonWindow(URL, 640, 480); win.openWebTop(); close(); </script> </window>

Here is some code you can paste into your app to create a test splash window:

<!DOCTYPE window> <window id="jslib" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="display: none;"> <script type="application/x-javascript" src="jslib.js" /> <script> include (jslib_window); const url = "chrome://jslib/content/splash.xul"; var win = new CommonWindow(url, 480, 380); win.position = JS_MIDDLE_CENTER; win.openSplash(); close(); </script> </window>

Function List

    CommonWindow(aURL, aWidth, aHeight)
Constructor.
aURL A document url:  eg: chrome://myapp/content/
aWidth width of the window to be created, this parameter is optional
aHeight height of the window to be created, this parameter is optional
    openFullScreen()
A Full Screen Open Method
    openWebTop()
An Entire Screen Open Method
    openSplash()
A Splash Screen Open Method
    open()
A normal Open Method
    openDialog()
A normal dialog Open Method

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.