Meziantou.Framework.WebPlatform.Scripting namespace

Classes

NameDescription
ClassicScriptA classic script (https://html.spec.whatwg.org/multipage/webappapis.html#classic-script) that the library asks the ScriptEngine to run: the script of a script element, a javascript: URL, or a string passed to setTimeout() or setInterval().
ConsoleMessageA message printed by the console namespace of a window (the Printer operation of the Console Standard, https://console.spec.whatwg.org/#printer), given to BrowsingContextOptions.ConsoleMessage.
EventHandlerCallbackThe value of an event handler (https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers) that is a callback of a script engine: an EventHandler, OnErrorEventHandler or OnBeforeUnloadEventHandler callback function. The library invokes it with the event handler processing algorithm and processes its return value (e.g. return false cancels the event).
EventHandlerSourceAn event handler content attribute to compile (https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler): the body of a function whose parameters are EventHandlerSource.Parameters, whose scope chain is the global environment of the realm of EventHandlerSource.Window, then EventHandlerSource.Document, EventHandlerSource.Form and EventHandlerSource.Element (when they are not null), and whose this value is the current target of the event.
ModuleFetchOptionsThe options of the fetches of the module scripts (https://html.spec.whatwg.org/multipage/webappapis.html#script-fetch-options).
ModuleScriptA module script (https://html.spec.whatwg.org/multipage/webappapis.html#module-script): the root of a module graph, the script of a <script type="module"> element, whose descendants are loaded and that is run by the ScriptEngine (see ScriptEngine.LoadModuleScriptGraph and ScriptEngine.ExecuteModuleScript).
NullValueThe value null, for the members whose type is any (whose .NET null value is undefined), e.g. the ErrorEvent.Error of the error event of a worker.
RejectedPromiseA promise rejected with a reason (e.g. the exception thrown by a callback whose return type is a promise), given to ScriptEngine.WaitForAll.
ScriptEngineA JavaScript engine plugged into the browsing contexts (BrowsingContextOptions.ScriptEngine). The library never executes scripts by itself: it implements the processing model of the HTML Standard (script elements, event handlers, javascript: URLs, error reporting, the event loop) and calls the engine at the points the standard defines, so the engine only runs code.
ScriptErrorThe information of an exception reported by the library (https://html.spec.whatwg.org/multipage/webappapis.html#extract-error): the attributes of the ErrorEvent fired at the window.
UndefinedValueThe value undefined, returned by the members whose type is any and whose .NET null value is null.
WebIdlAgent<TAdapter, TValue>The WebIDL bindings of the DOM for a JavaScript engine (an agent: the similar-origin window agent, or the agent of a worker): the realms of the global objects, and the JavaScript objects of the .NET objects. A platform object has a single JavaScript object, whichever realm accesses it, so the wrappers and the callbacks are shared by the realms.
WebIdlRealm<TAdapter, TValue>The realm of a global object (https://html.spec.whatwg.org/multipage/webappapis.html#realms-settings-objects-global-objects): its global object is a window or the global object of a worker, and its interface objects expose the interfaces of the platform that are exposed in the global object. The interface objects of a realm are created on first use.

Structs

NameDescription
JsErrorInformationThe information of an error value (https://html.spec.whatwg.org/multipage/webappapis.html#extract-error).
JsPropertyDescriptor<TValue>A property descriptor (https://tc39.es/ecma262/#sec-property-descriptor-specification-type).
ScriptLocationA location in the source of a running script (see ScriptEngine.GetCurrentScriptLocation): the source file, line number and column number of the violations of the content security policies (https://w3c.github.io/webappsec-csp/#create-violation-for-global, step 2).

Interfaces

NameDescription
IJsAdapter<TValue>The primitives of a JavaScript engine used by the WebIDL bindings (WebIdlAgent<TAdapter, TValue>). An engine exposes the DOM by implementing this interface with a struct: the bindings are generic over the adapter (where TAdapter : struct, IJsAdapter<TValue>), so the JIT specializes them for each engine (no boxing, no interface dispatch).
IJsCrossOriginObjectHandler<TValue>The operations of a cross-origin object (https://html.spec.whatwg.org/multipage/nav-history-apis.html#cross-origin-objects): a Location object, or the Window of a WindowProxy (IJsWindowProxyHandler<TValue>). The engine implements the internal methods of the object with them (see IJsAdapter<TValue>.CreateCrossOriginPlatformObject): the ordinary internal methods when IJsCrossOriginObjectHandler<TValue>.IsSameOrigin is true, else the cross-origin ones.
IJsHostObjectHandler<TValue>The internal methods of a host exotic object created by IJsAdapter<TValue>.CreatePlatformObject (the legacy platform objects, https://webidl.spec.whatwg.org/#es-legacy-platform-objects). Each method returns true when it handled the operation; otherwise the adapter performs the ordinary internal method.
IJsLazyAccessor<TValue>Creates the functions of a lazy accessor property (IJsAdapter<TValue>.DefineLazyAccessorProperty): one object per property, which the adapter can give to the engine as the state of shared callbacks, instead of closures and their delegates.
IJsLazyValue<TValue>Creates the value of a lazy data property (IJsAdapter<TValue>.DefineLazyDataProperty): one object per property, which the adapter can give to the engine as the state of a shared callback, instead of a closure and its delegate.
IJsWindowProxyHandler<TValue>The operations of a WindowProxy exotic object (https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-windowproxy-exotic-object), created by IJsAdapter<TValue>.CreateWindowProxy. Its internal methods are the ones of the specification: the indexed properties are the WindowProxy objects of the child navigables, the other properties are the properties of the global object of IJsWindowProxyHandler<TValue>.Window (same origin) or the cross-origin properties.
IWebIdlHostThe 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.

Enums

NameDescription
ConsoleMessageLevelThe severity of a ConsoleMessage: the log levels of the WebDriver BiDi log entries (https://w3c.github.io/webdriver-bidi/#types-log-logentry).
JsBufferKindThe JavaScript objects of the buffer source types (https://webidl.spec.whatwg.org/#idl-buffer-source-types).
JsInternalSlotThe internal slots of the built-in objects read by the structured serialization (IJsAdapter<TValue>.HasInternalSlot).
JsPropertyFlagsThe fields and attributes of a JsPropertyDescriptor<TValue>.
JsWellKnownSymbolThe well-known symbols used by the bindings.
ModuleTypeThe type of a module (https://html.spec.whatwg.org/multipage/webappapis.html#module-type-from-module-request).
PromiseRejectionOperationThe operation of the HostPromiseRejectionTracker abstract operation (https://tc39.es/ecma262/#sec-host-promise-rejection-tracker).

Delegates

NameDescription
JsHostConstructor<TValue>A built-in constructor implemented in .NET (IJsAdapter<TValue>.CreateConstructor): newTarget is undefined when it is called without new.
JsHostFunction<TValue>A built-in function implemented in .NET: returns the result of a call with thisValue and arguments.