Skip to main content
All Symbols - Web documentation
f
addEventListener
Registers an event listener in the global scope, which will be called synchronously whenever the event `type` is dispatched. ```ts addEventListener('unload', () => { console.log('All finished!'); }); ... dispatchEvent(new Event('unload')); ```
f
alert
Shows the given message and waits for the enter key pressed. If the stdin is not interactive, it does nothing.
f
atob
Decodes a string of data which has been encoded using base-64 encoding. ``` console.log(atob("aGVsbG8gd29ybGQ=")); // outputs 'hello world' ```
f
btoa
Creates a base-64 ASCII encoded string from the input string. ``` console.log(btoa("hello world")); // outputs "aGVsbG8gd29ybGQ=" ```
v
caches
No documentation available
f
clearInterval
Cancels a timed, repeating action which was previously started by a call to `setInterval()` ```ts const id = setInterval(() => {console.log('hello');}, 500); // ... clearInterval(id); ```
f
clearTimeout
Cancels a scheduled action initiated by `setTimeout()` ```ts const id = setTimeout(() => {console.log('hello');}, 500); // ... clearTimeout(id); ```
f
close
No documentation available
v
closed
No documentation available
f
confirm
Shows the given message and waits for the answer. Returns the user's answer as boolean. Only `y` and `Y` are considered as true. If the stdin is not interactive, it returns false.
v
console
No documentation available
f
createImageBitmap
Create a new [`ImageBitmap`](./././~/ImageBitmap) object from a given source.
v
crypto
No documentation available
f
dispatchEvent
Dispatches an event in the global scope, synchronously invoking any registered event listeners for this event in the appropriate order. Returns false if event is cancelable and at least one of the event handlers which handled this event called Event.preventDefault(). Otherwise it returns true. ```ts dispatchEvent(new Event('unload')); ```
f
fetch
Fetch a resource from the network. It returns a `Promise` that resolves to the `Response` to that `Request`, whether it is successful or not. ```ts const response = await fetch("http://my.json.host/data.json"); console.log(response.status); // e.g. 200 console.log(response.statusText); // e.g. "OK" const jsonData = await response.json(); ```
c
GPU
No documentation available
c
GPUBindGroup
No documentation available
c
GPUBindGroupLayout
No documentation available
c
GPUColorWrite
No documentation available
c
GPUCommandBuffer
No documentation available
c
GPUComputePipeline
No documentation available
c
GPUError
No documentation available
c
GPUInternalError
No documentation available
c
GPUMapMode
No documentation available
c
GPUOutOfMemoryError
No documentation available
c
GPUPipelineError
No documentation available
c
GPUPipelineLayout
No documentation available
c
GPUQuerySet
No documentation available
c
GPURenderBundle
No documentation available
c
GPURenderPipeline
No documentation available
c
GPUSampler
No documentation available
c
GPUShaderModule
No documentation available
c
GPUShaderStage
No documentation available
c
GPUTextureView
No documentation available
c
GPUUncapturedErrorEvent
No documentation available
c
GPUValidationError
No documentation available
N
Intl
No documentation available
I
Intl.DateTimeFormatRangePart
No documentation available
T
Intl.Formattable
No documentation available
v
localStorage
No documentation available
v
location
No documentation available
v
name
No documentation available
v
navigator
No documentation available
v
onbeforeunload
No documentation available
v
onerror
No documentation available
v
onload
No documentation available
v
onunhandledrejection
No documentation available
v
onunload
No documentation available
v
performance
No documentation available
f
prompt
Shows the given message and waits for the user's input. Returns the user's input as string. If the default value is given and the user inputs the empty string, then it returns the given default value. If the default value is not given and the user inputs the empty string, it returns the empty string. If the stdin is not interactive, it returns null.
f
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. ```ts queueMicrotask(() => { console.log('This event loop stack is complete'); }); ```
f
removeEventListener
Remove a previously registered event listener from the global scope ```ts const listener = () => { console.log('hello'); }; addEventListener('load', listener); removeEventListener('load', listener); ```
f
reportError
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 Deno, this error will terminate the process if not intercepted like above.
v
self
No documentation available
v
sessionStorage
No documentation available
f
setInterval
Repeatedly calls a function , with a fixed time delay between each call. ```ts // Outputs 'hello' to the console every 500ms setInterval(() => { console.log('hello'); }, 500); ```
f
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. ```ts setTimeout(() => { console.log('hello'); }, 500); ```
f
structuredClone
Creates a deep copy of a given value using the structured clone algorithm. Unlike a shallow copy, a deep copy does not hold the same references as the source object, meaning its properties can be changed without affecting the source. For more details, see [MDN](https://developer.mozilla.org/en-US/docs/Glossary/Deep_copy). Throws a `DataCloneError` if any part of the input value is not serializable.
N
Temporal
[Specification](https://tc39.es/proposal-temporal/docs/index.html)
T
Temporal.ArithmeticOptions
Options for arithmetic operations like `add()` and `subtract()`
T
Temporal.AssignmentOptions
Options for assigning fields using `with()` or entire objects with `from()`.
T
Temporal.CalendarLike
Any of these types can be passed to Temporal methods instead of a calendar ID.
T
Temporal.CalendarTypeToStringOptions
No documentation available
T
Temporal.ComparisonResult
No documentation available
T
Temporal.DateTimeUnit
No documentation available
T
Temporal.DateUnit
No documentation available
I
Temporal.DifferenceOptions
Options to control the result of `until()` and `since()` methods in `Temporal` types.
c
Temporal.Duration
A `Temporal.Duration` represents an immutable duration of time which can be used in date/time arithmetic. See https://tc39.es/proposal-temporal/docs/duration.html for more details.
I
Temporal.DurationArithmeticOptions
Options to control behavior of `Duration.compare()`
T
Temporal.DurationOptions
Options for assigning fields using `Duration.prototype.with()` or entire objects with `Duration.from()`, and for arithmetic with `Duration.prototype.add()` and `Duration.prototype.subtract()`.
T
Temporal.DurationRoundTo
The `round` method of the `Temporal.Duration` accepts one required parameter. If a string is provided, the resulting `Temporal.Duration` object will be rounded to that unit. If an object is provided, the `smallestUnit` and/or `largestUnit` property is required, while other properties are optional. A string parameter is treated the same as an object whose `smallestUnit` property value is that string.
T
Temporal.DurationTotalOf
Options to control behavior of `Duration.prototype.total()`
c
Temporal.Instant
A `Temporal.Instant` is an exact point in time, with a precision in nanoseconds. No time zone or calendar information is present. Therefore, `Temporal.Instant` has no concept of days, months, or even hours. For convenience of interoperability, it internally uses nanoseconds since the [Unix epoch](https://en.wikipedia.org/wiki/Unix_time) (midnight UTC on January 1, 1970). However, a `Temporal.Instant` can be created from any of several expressions that refer to a single point in time, including an [ISO 8601 string](https://en.wikipedia.org/wiki/ISO_8601) with a time zone offset such as '2020-01-23T17:04:36.491865121-08:00'. See https://tc39.es/proposal-temporal/docs/instant.html for more details.
T
Temporal.InstantToStringOptions
No documentation available
T
Temporal.LargestUnit
No documentation available
v
Temporal.Now
The `Temporal.Now` object has several methods which give information about the current date, time, and time zone. See https://tc39.es/proposal-temporal/docs/now.html for more details.
T
Temporal.OffsetDisambiguationOptions
No documentation available
c
Temporal.PlainDate
A `Temporal.PlainDate` represents a calendar date. "Calendar date" refers to the concept of a date as expressed in everyday usage, independent of any time zone. For example, it could be used to represent an event on a calendar which happens during the whole day no matter which time zone it's happening in. See https://tc39.es/proposal-temporal/docs/date.html for more details.
c
Temporal.PlainDateTime
A `Temporal.PlainDateTime` represents a calendar date and wall-clock time, with a precision in nanoseconds, and without any time zone. Of the Temporal classes carrying human-readable time information, it is the most general and complete one. `Temporal.PlainDate`, `Temporal.PlainTime`, `Temporal.PlainYearMonth`, and `Temporal.PlainMonthDay` all carry less information and should be used when complete information is not required. See https://tc39.es/proposal-temporal/docs/datetime.html for more details.
c
Temporal.PlainMonthDay
A `Temporal.PlainMonthDay` represents a particular day on the calendar, but without a year. For example, it could be used to represent a yearly recurring event, like "Bastille Day is on the 14th of July." See https://tc39.es/proposal-temporal/docs/monthday.html for more details.
c
Temporal.PlainTime
A `Temporal.PlainTime` represents a wall-clock time, with a precision in nanoseconds, and without any time zone. "Wall-clock time" refers to the concept of a time as expressed in everyday usage — the time that you read off the clock on the wall. For example, it could be used to represent an event that happens daily at a certain time, no matter what time zone. `Temporal.PlainTime` refers to a time with no associated calendar date; if you need to refer to a specific time on a specific day, use `Temporal.PlainDateTime`. A `Temporal.PlainTime` can be converted into a `Temporal.PlainDateTime` by combining it with a `Temporal.PlainDate` using the `toPlainDateTime()` method. See https://tc39.es/proposal-temporal/docs/time.html for more details.
c
Temporal.PlainYearMonth
A `Temporal.PlainYearMonth` represents a particular month on the calendar. For example, it could be used to represent a particular instance of a monthly recurring event, like "the June 2019 meeting". See https://tc39.es/proposal-temporal/docs/yearmonth.html for more details.
T
Temporal.PluralUnit
When the name of a unit is provided to a Temporal API as a string, it is usually singular, e.g. 'day' or 'hour'. But plural unit names like 'days' or 'hours' are also accepted.
T
Temporal.RoundingMode
No documentation available
T
Temporal.RoundTo
`round` methods take one required parameter. If a string is provided, the resulting `Temporal.Duration` object will be rounded to that unit. If an object is provided, its `smallestUnit` property is required while other properties are optional. A string is treated the same as an object whose `smallestUnit` property value is that string.
T
Temporal.ShowCalendarOption
No documentation available
T
Temporal.SmallestUnit
No documentation available
T
Temporal.TimeUnit
No documentation available
T
Temporal.TimeZoneLike
Any of these types can be passed to Temporal methods instead of a time zone ID.
T
Temporal.ToInstantOptions
Options for conversions of `Temporal.PlainDateTime` to `Temporal.Instant`
T
Temporal.ToStringPrecisionOptions
Options for outputting precision in toString() on types with seconds
T
Temporal.TotalUnit
No documentation available
T
Temporal.TransitionDirection
Options to control behaviour of `ZonedDateTime.prototype.getTimeZoneTransition()`
T
Temporal.ZonedDateTimeAssignmentOptions
No documentation available
T
Temporal.ZonedDateTimeToStringOptions
No documentation available
N
WebAssembly
No documentation available
f
WebAssembly.compile
The `WebAssembly.compile()` function compiles WebAssembly binary code into a `WebAssembly.Module` object. This function is useful if it is necessary to compile a module before it can be instantiated (otherwise, the `WebAssembly.instantiate()` function should be used). [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compile)
c
WebAssembly.CompileError
The `WebAssembly.CompileError` object indicates an error during WebAssembly decoding or validation. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/CompileError)
f
WebAssembly.compileStreaming
The `WebAssembly.compileStreaming()` function compiles a `WebAssembly.Module` directly from a streamed underlying source. This function is useful if it is necessary to a compile a module before it can be instantiated (otherwise, the `WebAssembly.instantiateStreaming()` function should be used). [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming)
T
WebAssembly.Exports
No documentation available
T
WebAssembly.ExportValue
No documentation available
c
WebAssembly.Global
A `WebAssembly.Global` object represents a global variable instance, accessible from both JavaScript and importable/exportable across one or more `WebAssembly.Module` instances. This allows dynamic linking of multiple modules. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Global)
I
WebAssembly.GlobalDescriptor
The `GlobalDescriptor` describes the options you can pass to `new WebAssembly.Global()`.
T
WebAssembly.ImportExportKind
No documentation available
T
WebAssembly.Imports
No documentation available
T
WebAssembly.ImportValue
No documentation available
c
WebAssembly.Instance
A `WebAssembly.Instance` object is a stateful, executable instance of a `WebAssembly.Module`. Instance objects contain all the Exported WebAssembly functions that allow calling into WebAssembly code from JavaScript. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance)
f
WebAssembly.instantiate
The WebAssembly.instantiate() function allows you to compile and instantiate WebAssembly code. This overload takes the WebAssembly binary code, in the form of a typed array or ArrayBuffer, and performs both compilation and instantiation in one step. The returned Promise resolves to both a compiled WebAssembly.Module and its first WebAssembly.Instance. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiate)
f
WebAssembly.instantiateStreaming
The `WebAssembly.instantiateStreaming()` function compiles and instantiates a WebAssembly module directly from a streamed underlying source. This is the most efficient, optimized way to load wasm code. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming)
c
WebAssembly.LinkError
The `WebAssembly.LinkError` object indicates an error during module instantiation (besides traps from the start function). [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/LinkError)
c
WebAssembly.Memory
The `WebAssembly.Memory` object is a resizable `ArrayBuffer` or `SharedArrayBuffer` that holds the raw bytes of memory accessed by a WebAssembly Instance. A memory created by JavaScript or in WebAssembly code will be accessible and mutable from both JavaScript and WebAssembly. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory)
I
WebAssembly.MemoryDescriptor
The `MemoryDescriptor` describes the options you can pass to `new WebAssembly.Memory()`.
c
WebAssembly.Module
A `WebAssembly.Module` object contains stateless WebAssembly code that has already been compiled by the browser — this can be efficiently shared with Workers, and instantiated multiple times. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module)
I
WebAssembly.ModuleExportDescriptor
A `ModuleExportDescriptor` is the description of a declared export in a `WebAssembly.Module`.
I
WebAssembly.ModuleImportDescriptor
A `ModuleImportDescriptor` is the description of a declared import in a `WebAssembly.Module`.
T
WebAssembly.ModuleImports
No documentation available
c
WebAssembly.RuntimeError
The `WebAssembly.RuntimeError` object is the error type that is thrown whenever WebAssembly specifies a trap. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/RuntimeError)
c
WebAssembly.Table
The `WebAssembly.Table()` object is a JavaScript wrapper object — an array-like structure representing a WebAssembly Table, which stores function references. A table created by JavaScript or in WebAssembly code will be accessible and mutable from both JavaScript and WebAssembly. [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Table)
I
WebAssembly.TableDescriptor
The `TableDescriptor` describes the options you can pass to `new WebAssembly.Table()`.
T
WebAssembly.TableKind
No documentation available
f
WebAssembly.validate
The `WebAssembly.validate()` function validates a given typed array of WebAssembly binary code, returning whether the bytes form a valid wasm module (`true`) or not (`false`). [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/validate)
T
WebAssembly.ValueType
No documentation available
I
WebAssembly.WebAssemblyInstantiatedSource
The value returned from `WebAssembly.instantiate`.
v
window
No documentation available