A summary of the native Javascript features of the Warzone JS environment. |
To find out what's in the JS environment, I used my tracebot AI script to prod and poke at various things.
Each of the headings below represents something I looked at (eg. Object = the JS Object class) followed by a bullet list of what I found. I've linked standard JS properties and methods to the related documentation on Mozilla Developer Network.
The properties are listed in the order returned by Object.getOwnPropertyNames(obj), not alphabetically.
The "global" object isn't defined in the WZ JS environment, but we can get at it by running this code on the global scope:
const global = this; |
It contains:
So there's quite a bit missing compared to what you'd see in a browser.
You'll note that, unusually, escape and unescape are defined in the global object – in browsers those functions usually live on the "window" object, but because Warzone isn't a browser they've been moved.
This is the Function constructor on the global object.
This is a function object (eg. one of your functions or event handlers), not the Function constructor (see above).
The string prototype, and this all string object instances, has the following properties/methods:
Items that are striked out are HTML-only features that are not relevant to Warzone.
ContentsAssimilate: |