Which objects can be used in a script?

When writing a script: which common or global JavaScript - objects are accessable?

I know of an object named “results” which offers some methods; how can I access the current “document”?

Hello Thomas,

The API documentation is not yet available unfortunately. But here’s a little trick: Create a new empty script, then in the script editor hit the Spacebar, then Backspace. This tricks the autocompletion engine to list all the available engines.

In scripts (not “javascript resources”), you don’t access the dom directly. you need to make requests, either through script (selectors and text replacements), or through the query() function, which works like the $(“”); function in jQuery. This is because scripts are not the same javascript environment as your browser - it’s a server-side scripting environment that’s executed before the template generates output.

Hitting “Spacebar” and then “Backspace” doesn’t work on my system - I figured out that “CTRL” + Spacebar is making it.

Doesn’t work.

Thomas is correct, in version 1.1 the trick I mention doesn’t work - but CTRL+Space does work, however.