revBrowserAddJavaScriptHandler | ||||||||||
Type | command | |||||||||
Dictionary | LCS | |||||||||
Library | LiveCode Script | |||||||||
Syntax |
| |||||||||
Summary | Adds the named handler to the 'LiveCode' object within the current JavaScript context of the browser. | |||||||||
Introduced | 6.7 | |||||||||
OS | mac, windows | |||||||||
Platforms | desktop | |||||||||
Parameters |
| |||||||||
Example |
| |||||||||
Related | Command: revBrowserStop, revBrowserPrint, revBrowserSet, revBrowserMakeTextBigger, revBrowserNavigate, revBrowserRemoveJavaScriptHandler, revBrowserClose Function: revBrowserOpen, revBrowserOpenCef Message: browserOver, browserNewInstance, browserNewUrlWindow, browserDownloadRequest, browserNavigateCompleteFrame | |||||||||
Security | network | |||||||||
Description | The revBrowserAddJavaScriptHandler adds the named handler to the 'LiveCode' object within the current JavaScript context of the browser. The revBrowserAddJavaScriptHandler function will make the named LiveCode handler visible to JavaScript within the browser as a function belonging to the global JavaScript 'LiveCode' object. Calling this JavaScript function will result in a call to the LiveCode handler, which will be passed the browser instance as the first parameter followed by any parameters given to the JavaScript function. A LiveCode card has the following handler:
Registered within the JavaScript context with the following command:
The JavaScript code within the browser can then call the LiveCode handler via the registered function:
|