Chromium Browser
The Chromium Browser can now be used when creating addons instead of having to use Internet Explorer. This enhancement is available for use in ILLiad v9.0 and higher, Aeon v4.0 and higher, and Ares v4.7 and higher. To use the Chrome browser for any pre-existing addons, they will need to be re-written to include the properties mentioned below since there is not an easy way to toggle for the new supported browser.Â
The Chromium Browser control manages the display and interaction with a chromium web browser. It allows for direct access to and manipulation of document elements including forms and form elements.
Properties
- Address: The URL of the current page.
- FieldName:Â A string representing the name of the control. This can be used for retrieving the control.
- Label:Â A string representing the label that should be displayed beside the field on the form.
- LabelVisible:Â A boolean value representing whether or not the label should be displayed.
- TypeName:Â A string representing the full name of the control type.
- WebBrowser:Â The underlying ChromiumWebBrowser object being managed by this control.
- Settings:Â Allows for additional configuration of the chromium web browser.
Methods
CheckHandlerQueue
Forces an immediate check of the page handler queue. This is primarily used when JavaScript and AJAX enabled pages perform updates that do not require an actual page change in the browser, but need to be detected and checked by the browser.
EvaluateScript
Executes javascript and returns the result. There are multiple EvaluateScript method signatures taking different arguments.
Javascript Response Object
The output type of all EvaluateScript methods is defined as the following. See the examples below making use of the javascript response object.
Property Name | Type |
---|---|
Message | string |
Success | bool |
Result | object |
EvaluateScript(script)
Executes the javascript code or function name.Â
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | script | The javascript code or javascript method name on the page that should be executed. |
Output | javascriptResponse | The result of the script execution as a JavascriptResponse object, defined as the following. |
EvaluateScript(script, args)
Executes the javascript code or function name and passes in arguments.Â
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | script | The javascript method name on the page that should be executed. |
Input | args | The arguments passed to the javascript method. |
Output | javascriptResponse | The result of the script execution as a JavascriptResponse object, defined as the following. |
EvaluateScript(timeout, script)
Executes the javascript code or function name with a timeout.Â
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | timeout | The timeout specified in milliseconds. |
Input | script | The javascript code or method name that should be executed. |
Output | javascriptResponse | The result of the script execution as a JavascriptResponse object, defined as the following. |
EvaluateScript(timeout, script, args)
Executes the javascript code or function name and passes in arguments and sets a timeout.Â
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | timeout | The timeout specified in milliseconds. |
Input | script | The javascript method that should be executed. |
Input | args | The arguments passed to the javascript method. |
Output | javascriptResponse | The result of the script execution as a JavascriptResponse object, defined as the following. |
ExecuteScript
Executes the supplied javascript code asynchronously in the context of the browser.
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | script | The javascript code or javascript function name that should be executed. |
Input - Optional | arguments | The arguments to be passed as params to the method |
Navigate
Attempts to load the specified url into the browser.
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | url | The url to navigate to |
RegisterPageHandler
Registers a new page handler for use in detecting when pages that have automated actions associated with them are loaded and alerting the addon script to respond to the page load.
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | idType | The type of page handler matching that should be done against the given id. A detailed description of the page handler types and how each works is listed in the Page Handlers section. |
Input | id | The id to match against |
Input | handlerName | The name of the Lua method that should be called when the page handler is invoked |
Input | critical | Whether or not the page handler is considered a critical page handler, which should exist outside of the normal queue and should be checked every time the the system checks for a page match |
ShowDevTools
Open developer tools in it's own window. The developer tools are useful when authoring and debugging an addon that uses the chromium web browser.
StartPageWatcher
Starts the page watcher, which will check the page handler queue (and critical page handlers) at an interval defined by checkInterval. If no match is found when the maxWatchTime is reached, the handler will stop. This is primarily used on pages that use AJAX or other similar methods to make dynamic changes to the page content without actually causing the page to fully change. In these cases, a page watcher can be started before performing an action that will cause a page update so that the new page state can be checked.
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | checkInterval | The interval, in milliseconds, that the page handler queue should be checked |
Input | maxWatchTime | The maximum amount of time,in milliseconds, the page watcher should run before stopping |
StopPageWatcher
Stops the page watcher so that it will not perform any more checks on the page handler queue.
Scripting Bridge
The scripting bridge allows for the browser to communicate with the addon system.Â
ExecuteAddonFunction
The executeAddonFunction is designed to allow javascript on the page to utilize lua functions that are within the addon.
Since javascript is case-sensitive, ensure that you call the function exactly as seen below.
atlasAddonAsync.executeAddonFunction
Parameter | Type | Description |
---|---|---|
functionName | string | The lua function to be called |
args | object[] | The arguments to be passed to the lua function |
DeleteCookies
Ability to delete cookies from the Chromium Browser. This ability can only be used with installations of Aeon v5.1.
Parameter Direction | Parameter Name | Parameter Description |
---|---|---|
Input | DeleteCookies | Delete any cookies from the Chromium Brower's history. |