Options class

The Options class enables you to access several options in REPORTER. More...

The REPORTER JavaScript API provides many class constants, properties and methods. For Arup to be able to extend and enhance the API in the future any constant, property or method names beginning with a lowercase or uppercase letter are reserved.
If you need to add your own properties or methods to one of the existing classes then to avoid any potential future conflict you should ensure that the name begins with either an underscore (_) or a dollar sign ($) or the name is prefixed with your own unique identifier.
For example if company 'ABC' need to add a property called 'example' then to avoid any potential future conflict use one of:

Options constants

Constants for Promises

Name Description
Options.RUN_PROMISE_CONSTRUCTOR Allow/run promises when an API constructor is called
Options.RUN_PROMISE_METHOD Allow/run promises when an API method is called
Options.RUN_PROMISE_PROPERTY Allow/run promises when an API property getter/setter is done
Options.RUN_PROMISE_SCRIPT Allow/run promises when a script is run
Options.RUN_PROMISE_WINDOW_LOOP Allow/run promises in a window event loop

Options class properties

Name Type Description
run_promises constant When any promise callbacks/handlers are allowed to run. Can be a bitwise OR of: Options.RUN_PROMISE_WINDOW_LOOP, Options.RUN_PROMISE_CONSTRUCTOR, Options.RUN_PROMISE_METHOD and Options.RUN_PROMISE_PROPERTY Options.RUN_PROMISE_SCRIPT The default is for all to be allowed. Promise handlers can also be run manually by using Utils.CallPromiseHandlers()

Detailed Description

The Options class is used to get/set options that REPORTER uses for certain functions. The options are available as class properties. See the documentation for more details. An example: Options.run_promises = Options.RUN_PROMISE_WINDOW_LOOP