Platform — Web platform APIs
Essential interfaces and functions for the runtime environment: scheduling and cancelling tasks, user prompts, and the global object.
Eg prompt, setTimeout
AbortController— A controller object that allows you to abort one or more DOM requests as and when desired.AbortSignal— A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.AbortSignalEventMapalert— Shows the given message and waits for the enter key pressed.AllowSharedBufferSourceBufferSourceclearInterval— Cancels a timed, repeating action which was previously started by a call to `setInterval()`clearTimeout— Cancels a scheduled action initiated by `setTimeout()`close— Exits the current Ende process.closed— Indicates whether the current window (context) is closed. In Ende, this property is primarily for API compatibility with browsers.confirm— Shows the given message and waits for the answer. Returns the user's answer as boolean.CSSRule— **UNSTABLE**: New API, yet to be vetted.CSSStyleSheet— **UNSTABLE**: New API, yet to be vetted.DOMExceptionDomIterableDOMStringListErrorConstructorImageDataImageDataArrayImageDataPixelFormatImageDataSettingsImportMeta— Ende provides extra properties on `import.meta`. These are included here to ensure that these are still available when using the Ende namespace in conjunction with other type libs, like `dom`.location— The Location object describing the absolute URL of the main module, available when the program is started with the `--location` flag. Accessing it without `--location` throws.Location— The location (URL) of the object it is linked to. Changes done on it are reflected on the object it relates to. Accessible via `globalThis.location`.Mathname— Gets or sets the name of the global scope's browsing context.navigator— Provides access to the Ende runtime's `Navigator` interface, which contains information about the environment in which the script is running.Navigator— Provides information about the Ende runtime environment and the system on which it's running. Similar to the browser `Navigator` object but adapted for the Ende context.NavigatorUABrandVersion— A brand and version pair describing a user agent, as returned by NavigatorUAData.NavigatorUAData— Gives access to information about the runtime's user agent, exposed via Navigator.userAgentData. This is the User-Agent Client Hints API.PredefinedColorSpaceprompt— Shows the given message and waits for the user's input. Returns the user's input as string.queueMicrotask— A microtask is a short function which is executed after the function or module which created it exits and only if the JavaScript execution stack is empty, but before returning control to the event loop being used to drive the script's execution environment. This event loop may be either the main event loop or the event loop driving a web worker.QuotaExceededError— Represents an error when a quota has been exceeded.QuotaExceededErrorOptionsRegExpConstructorreportError— Dispatch an uncaught exception. Similar to a synchronous version of: ```ts setTimeout(() => { throw error; }, 0); ``` The error can not be caught with a `try/catch` block. An error event will be dispatched to the global scope. You can prevent the error from being reported to the console with `Event.prototype.preventDefault()`: ```ts addEventListener("error", (event) => { event.preventDefault(); }); reportError(new Error("foo")); // Will not be reported. ``` In Ende, this error will terminate the process if not intercepted like above.self— Reference to the global object itself. Equivalent to the global `window` object in browser environments.setInterval— Repeatedly calls a function , with a fixed time delay between each call.setTimeout— Sets a timer which executes a function once after the delay (in milliseconds) elapses. Returns an id which may be used to cancel the timeout.structuredClone— Creates a deep copy of a given value using the structured clone algorithm.UADataValues— The values returned by NavigatorUAData.getHighEntropyValues.UALowEntropyJSON— The low-entropy values returned by NavigatorUAData.toJSON.Uint8ArrayUint8ArrayConstructorVoidFunctionWebTransport— MDN ReferenceWebTransportBidirectionalStream— MDN ReferenceWebTransportCloseInfoWebTransportCongestionControlWebTransportDatagramDuplexStream— MDN ReferenceWebTransportError— MDN ReferenceWebTransportErrorOptionsWebTransportErrorSourceWebTransportHashWebTransportOptionsWebTransportReceiveStream— MDN ReferenceWebTransportReceiveStreamStatsWebTransportSendGroup— MDN ReferenceWebTransportSendStream— MDN ReferenceWebTransportSendStreamOptionsWebTransportSendStreamStatsWebTransportWriter— MDN ReferenceWindow— Represents the global window object in the Ende runtime environment.WindowEventMap— Defines the mapping between event names and their corresponding event types for the `Window` interface in Ende.