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
c
c
c
c
c
c
c
c
c
c
GPUDevice
No documentation available
- createBindGroup
- createBindGroupLayout
- createBuffer
- createCommandEncoder
- createComputePipeline
- createComputePipelineAsync
- createPipelineLayout
- createQuerySet
- createRenderBundleEncoder
- createRenderPipeline
- createRenderPipelineAsync
- createSampler
- createShaderModule
- createTexture
- destroy
- features
- label
- limits
- lost
- popErrorScope
- pushErrorScope
- queue
c
GPUInternalError
No documentation available
c
c
GPUOutOfMemoryError
No documentation available
c
c
c
c
c
c
c
GPURenderPassEncoder
No documentation available
c
c
c
c
c
GPUSupportedLimits
No documentation available
- maxBindGroups
- maxBindingsPerBindGroup
- maxBufferSize
- maxColorAttachmentBytesPerSample
- maxColorAttachments
- maxComputeInvocationsPerWorkgroup
- maxComputeWorkgroupSizeX
- maxComputeWorkgroupSizeY
- maxComputeWorkgroupSizeZ
- maxComputeWorkgroupStorageSize
- maxComputeWorkgroupsPerDimension
- maxDynamicStorageBuffersPerPipelineLayout
- maxDynamicUniformBuffersPerPipelineLayout
- maxInterStageShaderComponents
- maxSampledTexturesPerShaderStage
- maxSamplersPerShaderStage
- maxStorageBufferBindingSize
- maxStorageBuffersPerShaderStage
- maxStorageTexturesPerShaderStage
- maxTextureArrayLayers
- maxTextureDimension1D
- maxTextureDimension2D
- maxTextureDimension3D
- maxUniformBufferBindingSize
- maxUniformBuffersPerShaderStage
- maxVertexAttributes
- maxVertexBufferArrayStride
- maxVertexBuffers
- minStorageBufferOffsetAlignment
- minUniformBufferOffsetAlignment
c
GPUTexture
No documentation available
c
GPUTextureUsage
No documentation available
c
c
c
GPUValidationError
No documentation available
N
Intl
No documentation available
I
I
I
T
Intl.Formattable
No documentation available
v
localStorage
No documentation available
v
location
No documentation available
v
name
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
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
T
Temporal.DurationLike
No documentation available
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
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.
- add
- calendarId
- compare
- day
- dayOfWeek
- dayOfYear
- daysInMonth
- daysInWeek
- daysInYear
- equals
- era
- eraYear
- from
- hour
- inLeapYear
- microsecond
- millisecond
- minute
- month
- monthCode
- monthsInYear
- nanosecond
- round
- second
- since
- subtract
- toJSON
- toLocaleString
- toPlainDate
- toPlainTime
- toString
- toZonedDateTime
- until
- valueOf
- weekOfYear
- with
- withCalendar
- withPlainTime
- year
- yearOfWeek
T
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.
T
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
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()`
c
Temporal.ZonedDateTime
No documentation available
- add
- calendarId
- compare
- day
- dayOfWeek
- dayOfYear
- daysInMonth
- daysInWeek
- daysInYear
- epochMilliseconds
- epochNanoseconds
- equals
- era
- eraYear
- from
- getTimeZoneTransition
- hour
- hoursInDay
- inLeapYear
- microsecond
- millisecond
- minute
- month
- monthCode
- monthsInYear
- nanosecond
- offset
- offsetNanoseconds
- round
- second
- since
- startOfDay
- subtract
- timeZoneId
- toInstant
- toJSON
- toLocaleString
- toPlainDate
- toPlainDateTime
- toPlainTime
- toString
- until
- valueOf
- weekOfYear
- with
- withCalendar
- withPlainTime
- withTimeZone
- year
- yearOfWeek
T
Temporal.ZonedDateTimeAssignmentOptions
No documentation available
T
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