[Jslib] Including only part of JSlib into XUL app

Pete Collins pete at mozdev.org
Wed Sep 17 09:31:58 EDT 2003


mark bokil wrote:
> I am working on an XUL application and I just need from jslib the IO 
> libraries to keep the file size down. Can I copy just the IO folder into 
> my own content folder for an XUL app and then reference the .JS files? 
> What would I have to do to make this work?


All you would need to do is copy the "io" folder to your project.

Change the io identifier paths in jslib.js to point to where "io" is now 
located and possibly any chrome paths referenced in the io files.

eg,

   jslib_io = "chrome://myproject/content/io";


Then use the jslib.js file in your xul.

<script type="application/x-javascript" src="jslib.js" />;


<script>
     include (jslib_file);
</script>

But over all i bet it's just easier using jslib w/ your project.

--pete

-- 
Pete Collins
www.mozdev.org
www.mozdevgroup.com




More information about the Jslib mailing list