78
edits
MarkFinkle (talk | contribs) (initial (incomplete) save) |
m (Made a note about startup and shutdown functions) |
||
| Line 27: | Line 27: | ||
void add(aTitle, aURI); | void add(aTitle, aURI); | ||
}; | }; | ||
</pre> | |||
There are also hooks that are called when WebRunner has loaded and when it is about to exit. You can declare these functions in the webapp script: | |||
<pre> | |||
function startup() { | |||
// called during startup | |||
} | |||
function shutdown() { | |||
// called during shutdown | |||
} | |||
</pre> | </pre> | ||
Currently, the webapp script also has access to full XPCOM functionality, just like a Firefox extension. This level of functionality is commonly called ''chrome-level'' privileges. It means that the script has a higher level of privilege than scripts in the web content and has access to the file system, clipboard and other parts of the native OS. | Currently, the webapp script also has access to full XPCOM functionality, just like a Firefox extension. This level of functionality is commonly called ''chrome-level'' privileges. It means that the script has a higher level of privilege than scripts in the web content and has access to the file system, clipboard and other parts of the native OS. | ||
<div class="note">In the future, the webapp script may have lower privileges. We are looking into the security aspects of the higher privilege level.</div> | <div class="note">In the future, the webapp script may have lower privileges. We are looking into the security aspects of the higher privilege level.</div> | ||
edits