Prism/Scripting: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 1: Line 1:
WebRunner allows for some client-side web application customization. The web application [[WebRunner:Bundle|bundle]] is allowed to hold a JavaScript file named '''webapp.js''' (called the webapp script). This file will be loaded into the WebRunner chrome window very much like a Firefox extension is loaded into the browser chrome window.
Prism allows for some client-side web application customization. The web application [[Prism/Bundle|bundle]] is allowed to hold a JavaScript file named '''webapp.js''' (called the webapp script). This file will be loaded into the Prism chrome window very much like a Firefox extension is loaded into the browser chrome window.


WebRunner exposes a simple HostUI object to the webapp script. The HostUI object exposes some utility functions that may be useful to the webapp script. The interface is shown below:
Prism exposes a simple HostUI object to the webapp script. The HostUI object exposes some utility functions that may be useful to the webapp script. The interface is shown below:
<pre>
<pre>
/**
/**
Line 29: Line 29:
</pre>
</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:
There are also hooks that are called when Prism has loaded and when it is about to exit. You can declare these functions in the webapp script:
<pre>
<pre>
function startup() {
function startup() {
canmove, Confirmed users, Bureaucrats and Sysops emeriti
2,798

edits

Navigation menu