hmm, am I the only person to be crazy enough to write the module loader code in an external file, and use the JS subscript loader to dynamically load in my actual component implementations? (i.e. the actually implementation JS don't have the module stuff, so they get ignored by the component loader, and the file with the module stuff is in a separate file. See about:kitchensink for impl details.)
The advantage being I pretty much don't have to write module stuff again, just tweak the file names and class names
Cross-window background code... Ideas/Explanation?
-
- Posts: 331
- Joined: November 24th, 2002, 8:20 pm
- Location: Iowa
- Contact:
Mook wrote:hmm, am I the only person to be crazy enough to write the module loader code in an external file, and use the JS subscript loader to dynamically load in my actual component implementations? (i.e. the actually implementation JS don't have the module stuff, so they get ignored by the component loader, and the file with the module stuff is in a separate file. See about:kitchensink for impl details.)
The advantage being I pretty much don't have to write module stuff again, just tweak the file names and class names
I've thought about doing this. What I would really like to do is use the javascript loader only when the nsIFactory createInstance is called, so that the files are loaded lazily when the class is created.
On a side note, I've started to put together an example of creating javascript xpcom objects in the knowledge base, but it isn't finished yet.
My Extensions:
<a href="http://forecastfox.mozdev.org">Forecastfox</a>
<a href="http://tipbar.mozdev.org">Tip of the Day</a>
<a href="http://urlnav.mozdev.org">Location Navigator</a>
<a href="http://finder.mozdev.org">Finder</a>
<a href="http://rsszilla.mozdev.org">RSSzilla</a>
<a href="http://forecastfox.mozdev.org">Forecastfox</a>
<a href="http://tipbar.mozdev.org">Tip of the Day</a>
<a href="http://urlnav.mozdev.org">Location Navigator</a>
<a href="http://finder.mozdev.org">Finder</a>
<a href="http://rsszilla.mozdev.org">RSSzilla</a>
-
- Posts: 118
- Joined: May 26th, 2005, 11:06 am
-
- Posts: 846
- Joined: August 4th, 2003, 9:32 am
-
- Posts: 4019
- Joined: November 16th, 2003, 3:05 am
- Location: Russia, Moscow
Yes, it's great that you're doing it.
I moved the page to http://kb.mozillazine.org/Implementing_ ... JavaScript though - we have decided to switch off the older naming scheme quite a while ago.
Daniel_Orner: let's take it to a separate thread, ok? (And please describe the situation again there)
I moved the page to http://kb.mozillazine.org/Implementing_ ... JavaScript though - we have decided to switch off the older naming scheme quite a while ago.
Daniel_Orner: let's take it to a separate thread, ok? (And please describe the situation again there)