Window
Type: Window
Script class for Window utilities.
A global 'window' object is provided to access these functions and the 'workpage'.
var button = window.findViewByID("do_not_press"); var button2 = window.do_not_press; // shorthand var button = window.do_not_press; // shorthand
Properties
| Property | Description |
|---|---|
| Since version 4.04.23, view IDs may be accessed directly instead of through findViewByID. Assignment to an unspecified ID shall set the script id of the view being assigned. |
Methods
| Method | Description |
|---|---|
addView(type [, options])
| Create a new view of the given type, with the given options. Returns a reference to the newly created view. options is an object containing key/value pairs of view properties to set on creation.
Type May be one of the following:
Not all view types are available in all editions of the software. Some view types may require additional parameters in the options object. |
close()
| Close the tab |
findViewByID(id)
| Searches child views for the first one with a script ID that matches 'id' (set via view properties). Returns a reference to the view, or 'null' if nothing found. |
findViewByTitle(title)
| Searches child views for the first one with a title that matches 'title'. Returns a reference to the view, or 'null' if nothing found. |
getParent()
| Get the parent window/view (if any) of this window. |
setRefreshTimer(callback)
| Sets a callback function to be called periodically, dependent upon the user interface update rate setting in general preferences. Typically around 25Hz. To cancel the timer, call this function with a 'null' argument. |
show()
| Show the tab |