[Jslib] Can I use jslib with good ol HTML/JavaScript?

Stephen Knight stknight at ultralifebatteries.com
Wed Oct 1 14:53:39 EDT 2003


Gary Frederick wrote:
> Does jslib require a XUL app?
> 
> I want to read/write a file in HTML/JavaScript. The example will become 
> a XUL app but I want a simple version that is HTML.

When I've tried the following, it's always "died a quiet death" when trying to load jslib.js.  No 
error messages, just silence.  Including the enablePrivilege() command didn't make any difference.

hope this helps.

<html>
     <head>
         <title>jslib test</title>
     </head>

<script type="application/x-javascript">
     netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
</script>
<script type="application/x-javascript" src="chrome://jslib/content/jslib.js" />

<body>

<script type="application/x-javascript">
     include( JS_LIB_PATH + "sound/sound.js" );
     var gBeep = new Sound;
     document.writeln( " <center>You should hear a beep!<center>" );
</script>

</body>

</html>

-- 
Stephen Knight
Ultralife Batteries, Inc.
315-332-7100x628



More information about the Jslib mailing list