IWebIdlHost Interface
The services the WebIDL bindings need from the script engine that uses them: error reporting, and the bookkeeping of the JavaScript execution context stack around the callbacks.
public interface IWebIdlHostProperties
| Name | Description |
|---|---|
| IsScriptRunning | Gets whether JavaScript code is running (the JavaScript execution context stack is not empty): the current realm of the engine is then the realm of the running code. The default is false. |
IsScriptRunning
WebIdlAgent.csMethods
| Name | Description |
|---|---|
| CheckInterrupt() | Called periodically while WebAssembly code runs: throws when the running script must be interrupted (e.g. the timeout of the engine). The default does nothing. |
| OnCallbackInvoked(GlobalScope) | Called after a callback is invoked ("clean up after running a callback", https://webidl.spec.whatwg.org/#clean-up-after-running-a-callback): the engine performs a microtask checkpoint when no script is running. |
| OnCallbackInvoking() | Called before a callback is invoked: the JavaScript execution context stack is not empty until IWebIdlHost.OnCallbackInvoked. |
| ReportException(GlobalScope, Exception) | Reports an exception thrown by a callback (e.g. an event listener) to the global object of a realm (https://html.spec.whatwg.org/multipage/webappapis.html#report-an-exception). |
CheckInterrupt()
WebIdlAgent.csCalled periodically while WebAssembly code runs: throws when the running script must be interrupted (e.g. the timeout of the engine). The default does nothing.
public void CheckInterrupt()OnCallbackInvoked(GlobalScope)
Called after a callback is invoked ("clean up after running a callback", https://webidl.spec.whatwg.org/#clean-up-after-running-a-callback): the engine performs a microtask checkpoint when no script is running.
void OnCallbackInvoked(GlobalScope global)Parameters
globalGlobalScope
OnCallbackInvoking()
Called before a callback is invoked: the JavaScript execution context stack is not empty until IWebIdlHost.OnCallbackInvoked.
void OnCallbackInvoking()ReportException(GlobalScope, Exception)
Reports an exception thrown by a callback (e.g. an event listener) to the global object of a realm (https://html.spec.whatwg.org/multipage/webappapis.html#report-an-exception).
void ReportException(GlobalScope global, Exception exception)Parameters
globalGlobalScopeexceptionException