gnusto 
| resources: | Home Installation Mailing list Source code Bugs Screenshots Nightlies |
|---|---|
| reference: | Roadmap Error messages Code overview Debugger (prototype only) Playthroughs |
mozilla-glue.js
mozilla-glue.js is the central JavaScript file in Gnusto. It currently has three purposes, which will be split up when the file is refactored; you are warned, however, that this file is currently a mess.
The identifier prefix for mozilla-glue is glue.
It gives the engine what it needs to function.
Reason for the name: The Gnusto engine was designed to be usable in many circumstances: Mozilla apps, simple browser-independent web pages and command-line JavaScript shells (much of the original development was done on a machine without even an X server). This design called for the engine to be supplied with "glue" code wherever it was installed, to provide anything which was dependent on the local environment.
mozilla-glue continues to supply many of the engine's needs, although the engine makes much less use of callbacks now. Eventually the engine will progress to the point where no callbacks are needed, and then this function will disappear.
Functions which provide this
- getbyte, setbyte-- will be removed after the resolution of the null bytes problem; the story will be passed into the engine in an array.
- gnustoglue_*-- vestiges of callbacks. (These were all originally callbacks from the engine; many are only now called by mozilla-glue's supporting code. They should all be renamed or put inline.)
It powers the user interface.
Almost all the on-event handlers in the user interface call functions in mozilla-glue.
The future: With the advent of Darii, all such functions should become Darii actions.
It's a dumping ground for code that doesn't fit anywhere else.
This is a positively bad idea: it has made this file into a big mess. Code like this should be moved to new sections soon.