nx.js

nx.js

Namespaces

NamespaceDescription
SwitchThe Switch global object contains native interfaces to interact with the Switch hardware.
WebAssemblyThe WebAssembly JavaScript object acts as the namespace for all WebAssembly-related functionality.

Classes

ClassDescription
AbortController-
AbortSignalEventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
AmbientLightSensorSensor implementation which returns the current light level or illuminance of the ambient light around the hosting device.
AudioThe Audio class provides audio playback functionality similar to the HTMLAudioElement in web browsers.
BatteryManagerProvides information about the system's battery charge level. The navigator.getBattery() method returns a promise that resolves to a BatteryManager instance.
BlobA file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format.
ByteLengthQueuingStrategyThis Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
CanvasGradient-
CanvasRenderingContext2D-
CloseEvent-
CompressionStream-
Console-
CountQueuingStrategyThis Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
CryptoBasic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives.
CryptoKey-
CustomEvent-
DecompressionStream-
DOMExceptionType declarations for the native DOMException class provided by QuickJS-ng. The runtime implementation lives in the engine itself — this file only exists so the types are emitted in the published index.d.ts.
DOMMatrix-
DOMMatrixReadOnly-
DOMPointMDN Reference
DOMPointReadOnlyMDN Reference
DOMRectMDN Reference
DOMRectReadOnlyMDN Reference
ErrorEvent-
Event-
EventTargetEventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
FileA file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format.
FontFaceDefines the source of a font face, either a URL to an external resource or a buffer, and font properties such as style, weight, and so on. For URL font sources it allows authors to trigger when the remote font is fetched and loaded, and to track loading status.
FontFaceSetManages the loading of font-faces and querying of their download status.
FormData-
GamepadDefines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id.
GamepadButtonDefines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device.
GamepadEvent-
GamepadHapticActuatorRepresents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
HeadersThis Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing.
ImageThe Image class is the spiritual equivalent of the HTMLImageElement class in web browsers. You can use it to load image data from the filesytem or remote source over the network. Once loaded, the image may be drawn onto the screen context or an offscreen canvas context using ctx.drawImage().
ImageBitmapRepresents a bitmap image which can be drawn to a <canvas> without undue latency. It can be created from a variety of source objects using the createImageBitmap() function.
ImageData-
KeyboardEvent-
MessageEvent-
NavigatorThe Navigator interface represents the state and the identity of the user agent. It allows scripts to query it and to register themselves to carry on some activities.
OffscreenCanvas-
OffscreenCanvasRenderingContext2D-
Path2DDeclares a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired.
PerformanceNote: performance.now() currently uses Date.now() internally, providing millisecond resolution. A future version may use the Switch's svcGetSystemTick for sub-millisecond precision once a native binding is available.
PerformanceEntry-
PerformanceMark-
PerformanceMeasure-
PromiseRejectionEvent-
ReadableByteStreamControllerMDN Reference
ReadableStreamThis Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
ReadableStreamBYOBReaderMDN Reference
ReadableStreamBYOBRequestMDN Reference
ReadableStreamDefaultControllerMDN Reference
ReadableStreamDefaultReaderMDN Reference
Request-
ResponseClass representing a HTTP response.
ScreenEventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
SensorSensor is the base class for all the other sensor interfaces. This interface cannot be used directly. Instead it provides properties, event handlers, and methods accessed by interfaces that inherit from it.
Storage-
SubtleCrypto-
TextDecoderThe TextDecoder interface represents a decoder for a specific text encoding. The implementation in nx.js only supports "utf-8" decoding.
TextEncoderTextEncoder takes a UTF-8 encoded string of code points as input and return a stream of bytes.
TouchA single contact point on a touch-sensitive device. The contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
TouchEvent-
TouchListA list of contact points on a touch surface. For example, if the user has three fingers on the touch surface (such as a screen or trackpad), the corresponding TouchList object would have one Touch object for each finger, for a total of three entries.
TransformStreamMDN Reference
TransformStreamDefaultControllerMDN Reference
UIEvent-
URLThe URL interface is used to parse, construct, normalize, and encode URLs. It works by providing properties which allow you to easily read and modify the components of a URL.
URLSearchParamsMDN Reference
VirtualKeyboard-
WebSocketThe WebSocket object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
WindowThe Window class represents the global scope within the application.
WritableStreamThis Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.
WritableStreamDefaultControllerThis Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
WritableStreamDefaultWriterThis Streams API interface is the object returned by WritableStream.getWriter() and once created locks the writer to the WritableStream ensuring that no other streams can write to the underlying sink.

Interfaces

InterfaceDescription
AddEventListenerOptions-
AesCbcParams-
AesCtrParams-
AesDerivedKeyParams-
AesGcmParams-
AesKeyGenParams-
AesXtsParams-
Algorithm-
AmbientLightSensorOptions-
ArrayBufferView-
BlobPropertyBag-
CloseEventInit-
ConsoleOptions-
CryptoKeyPair-
CustomEventInit-
DOMMatrix2DInit-
DOMMatrixInit-
DOMPointInit-
DOMRectInit-
EcdhKeyDeriveParams-
EcdsaParams-
EcKeyGenParams-
EcKeyImportParams-
ErrorEventInit-
EventInit-
EventListener-
EventListenerObject-
EventListenerOptions-
EventModifierInit-
FilePropertyBag-
FontFaceDescriptors-
FrameRequestCallback-
GamepadEffectParameters-
GamepadEventInit-
HkdfParams-
HmacImportParams-
HmacKeyGenParams-
ImageBitmapOptions-
ImageDataSettings-
ImageEncodeOptions-
ImportMetaThe import.meta meta-property exposes context-specific metadata to a JavaScript module. It contains information about the module, such as the module's URL.
JsonWebKey-
KeyboardEventInit-
MessageEventInit-
PromiseRejectionEventInit-
QueuingStrategy-
QueuingStrategyInit-
QueuingStrategySize-
ReadableStreamGenericReader-
ReadableStreamIteratorOptions-
ReadableStreamReadDoneResult-
ReadableStreamReadValueResult-
RequestInit-
ResponseInit-
StreamPipeOptions-
TextDecodeOptions-
TextEncoderEncodeIntoResult-
TextMetrics-
TouchEventInit-
TouchInit-
Transformer-
TransformerFlushCallback-
TransformerStartCallback-
TransformerTransformCallback-
UIEventInit-
Uint8ArrayFromBase64Options-
Uint8ArraySetFromResult-
Uint8ArrayToBase64Options-
UnderlyingByteSource-
UnderlyingDefaultSource-
UnderlyingSink-
UnderlyingSinkAbortCallback-
UnderlyingSinkCloseCallback-
UnderlyingSinkStartCallback-
UnderlyingSinkWriteCallback-
UnderlyingSource-
UnderlyingSourceCancelCallback-
UnderlyingSourcePullCallback-
UnderlyingSourceStartCallback-

Type Aliases

Variables

VariableDescription
consoleThe global console object contains functions for printing text to the screen, which can be useful for text-based applications, and is also useful for debugging.
cryptoThe global crypto property returns the Crypto object associated to the global object. This object allows your application to access to certain cryptographic related services.
fontsContains the available fonts for use on the screen Canvas context.
localStoragelocalStorage is a Storage instance which persists to the system's Save Data filesystem.
navigator-
performance-
screen-
stopImmediatePropagationFlagWeakSet tracking events whose stopImmediatePropagation() was called. Used by EventTarget.dispatchEvent() to halt listener iteration.
window-

Functions

FunctionDescription
addEventListener-
atobDecodes a string of data which has been encoded using Base64 encoding.
btoaCreates a Base64-encoded ASCII string from a binary string (i.e., a string in which each character in the string is treated as a byte of binary data).
cancelAnimationFrameCancels an animation frame request previously scheduled through a call to requestAnimationFrame().
clearIntervalThe global clearInterval() method clears a timer set with the setInterval() method.
clearTimeoutThe global clearTimeout() method clears a timer set with the setTimeout() method.
createImageBitmapCreates a bitmap from a given source, optionally cropped to contain only a portion of that source. This function accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap.
dispatchEventDispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
fetchThe global fetch() method starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
queueMicrotaskQueues a microtask to be executed at a safe time prior to control returning to the runtime's event loop.
removeEventListenerRemoves the event listener in target's event listener list with the same type, callback, and options.
requestAnimationFrameTells the application that you wish to perform an animation. The application will call the supplied callback function prior to the next repaint.
setIntervalThe global setInterval() method repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.
setTimeoutThe global setTimeout() method sets a timer which executes a function or specified piece of code once the timer expires.

On this page