• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html lang="en">
3<head>
4  <meta charset="utf-8">
5  <meta name="viewport" content="width=device-width">
6  <meta name="nodejs.org:node-version" content="v18.20.1">
7  <title>Global objects | Node.js v18.20.1 Documentation</title>
8  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic&display=fallback">
9  <link rel="stylesheet" href="assets/style.css">
10  <link rel="stylesheet" href="assets/hljs.css">
11  <link rel="canonical" href="https://nodejs.org/api/globals.html">
12  <script async defer src="assets/api.js" type="text/javascript"></script>
13
14</head>
15<body class="alt apidoc" id="api-section-globals">
16  <div id="content" class="clearfix">
17    <div id="column2" class="interior">
18      <div id="intro" class="interior">
19        <a href="/" title="Go back to the home page">
20          Node.js
21        </a>
22      </div>
23      <ul>
24<li><a href="documentation.html" class="nav-documentation">About this documentation</a></li>
25<li><a href="synopsis.html" class="nav-synopsis">Usage and example</a></li>
26</ul>
27<hr class="line">
28<ul>
29<li><a href="assert.html" class="nav-assert">Assertion testing</a></li>
30<li><a href="async_context.html" class="nav-async_context">Asynchronous context tracking</a></li>
31<li><a href="async_hooks.html" class="nav-async_hooks">Async hooks</a></li>
32<li><a href="buffer.html" class="nav-buffer">Buffer</a></li>
33<li><a href="addons.html" class="nav-addons">C++ addons</a></li>
34<li><a href="n-api.html" class="nav-n-api">C/C++ addons with Node-API</a></li>
35<li><a href="embedding.html" class="nav-embedding">C++ embedder API</a></li>
36<li><a href="child_process.html" class="nav-child_process">Child processes</a></li>
37<li><a href="cluster.html" class="nav-cluster">Cluster</a></li>
38<li><a href="cli.html" class="nav-cli">Command-line options</a></li>
39<li><a href="console.html" class="nav-console">Console</a></li>
40<li><a href="corepack.html" class="nav-corepack">Corepack</a></li>
41<li><a href="crypto.html" class="nav-crypto">Crypto</a></li>
42<li><a href="debugger.html" class="nav-debugger">Debugger</a></li>
43<li><a href="deprecations.html" class="nav-deprecations">Deprecated APIs</a></li>
44<li><a href="diagnostics_channel.html" class="nav-diagnostics_channel">Diagnostics Channel</a></li>
45<li><a href="dns.html" class="nav-dns">DNS</a></li>
46<li><a href="domain.html" class="nav-domain">Domain</a></li>
47<li><a href="errors.html" class="nav-errors">Errors</a></li>
48<li><a href="events.html" class="nav-events">Events</a></li>
49<li><a href="fs.html" class="nav-fs">File system</a></li>
50<li><a href="globals.html" class="nav-globals active">Globals</a></li>
51<li><a href="http.html" class="nav-http">HTTP</a></li>
52<li><a href="http2.html" class="nav-http2">HTTP/2</a></li>
53<li><a href="https.html" class="nav-https">HTTPS</a></li>
54<li><a href="inspector.html" class="nav-inspector">Inspector</a></li>
55<li><a href="intl.html" class="nav-intl">Internationalization</a></li>
56<li><a href="modules.html" class="nav-modules">Modules: CommonJS modules</a></li>
57<li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li>
58<li><a href="module.html" class="nav-module">Modules: <code>node:module</code> API</a></li>
59<li><a href="packages.html" class="nav-packages">Modules: Packages</a></li>
60<li><a href="net.html" class="nav-net">Net</a></li>
61<li><a href="os.html" class="nav-os">OS</a></li>
62<li><a href="path.html" class="nav-path">Path</a></li>
63<li><a href="perf_hooks.html" class="nav-perf_hooks">Performance hooks</a></li>
64<li><a href="permissions.html" class="nav-permissions">Permissions</a></li>
65<li><a href="process.html" class="nav-process">Process</a></li>
66<li><a href="punycode.html" class="nav-punycode">Punycode</a></li>
67<li><a href="querystring.html" class="nav-querystring">Query strings</a></li>
68<li><a href="readline.html" class="nav-readline">Readline</a></li>
69<li><a href="repl.html" class="nav-repl">REPL</a></li>
70<li><a href="report.html" class="nav-report">Report</a></li>
71<li><a href="single-executable-applications.html" class="nav-single-executable-applications">Single executable applications</a></li>
72<li><a href="stream.html" class="nav-stream">Stream</a></li>
73<li><a href="string_decoder.html" class="nav-string_decoder">String decoder</a></li>
74<li><a href="test.html" class="nav-test">Test runner</a></li>
75<li><a href="timers.html" class="nav-timers">Timers</a></li>
76<li><a href="tls.html" class="nav-tls">TLS/SSL</a></li>
77<li><a href="tracing.html" class="nav-tracing">Trace events</a></li>
78<li><a href="tty.html" class="nav-tty">TTY</a></li>
79<li><a href="dgram.html" class="nav-dgram">UDP/datagram</a></li>
80<li><a href="url.html" class="nav-url">URL</a></li>
81<li><a href="util.html" class="nav-util">Utilities</a></li>
82<li><a href="v8.html" class="nav-v8">V8</a></li>
83<li><a href="vm.html" class="nav-vm">VM</a></li>
84<li><a href="wasi.html" class="nav-wasi">WASI</a></li>
85<li><a href="webcrypto.html" class="nav-webcrypto">Web Crypto API</a></li>
86<li><a href="webstreams.html" class="nav-webstreams">Web Streams API</a></li>
87<li><a href="worker_threads.html" class="nav-worker_threads">Worker threads</a></li>
88<li><a href="zlib.html" class="nav-zlib">Zlib</a></li>
89</ul>
90<hr class="line">
91<ul>
92<li><a href="https://github.com/nodejs/node" class="nav-https-github-com-nodejs-node">Code repository and issue tracker</a></li>
93</ul>
94    </div>
95
96    <div id="column1" data-id="globals" class="interior">
97      <header class="header">
98        <div class="header-container">
99          <h1>Node.js v18.20.1 documentation</h1>
100          <button class="theme-toggle-btn" id="theme-toggle-btn" title="Toggle dark mode/light mode" aria-label="Toggle dark mode/light mode" hidden>
101            <svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" height="24" width="24">
102              <path fill="none" d="M0 0h24v24H0z" />
103              <path d="M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"/>
104              <path d="M7 16h-.18C6.4 14.84 5.3 14 4 14c-1.66 0-3 1.34-3 3s1.34 3 3 3h3c1.1 0 2-.9 2-2s-.9-2-2-2z"/>
105            </svg>
106            <svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon" height="24" width="24">
107              <path d="M0 0h24v24H0z" fill="none" />
108              <path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"/>
109            </svg>
110          </button>
111        </div>
112        <div id="gtoc">
113          <ul>
114            <li class="pinned-header">Node.js v18.20.1</li>
115
116    <li class="picker-header">
117      <a href="#">
118        <span class="collapsed-arrow">&#x25ba;</span><span class="expanded-arrow">&#x25bc;</span>
119        Table of contents
120      </a>
121
122      <div class="picker"><div class="toc"><ul>
123<li><a href="#global-objects">Global objects</a>
124<ul>
125<li><a href="#class-abortcontroller">Class: <code>AbortController</code></a>
126<ul>
127<li><a href="#abortcontrollerabortreason"><code>abortController.abort([reason])</code></a></li>
128<li><a href="#abortcontrollersignal"><code>abortController.signal</code></a></li>
129<li><a href="#class-abortsignal">Class: <code>AbortSignal</code></a>
130<ul>
131<li><a href="#static-method-abortsignalabortreason">Static method: <code>AbortSignal.abort([reason])</code></a></li>
132<li><a href="#static-method-abortsignaltimeoutdelay">Static method: <code>AbortSignal.timeout(delay)</code></a></li>
133<li><a href="#static-method-abortsignalanysignals">Static method: <code>AbortSignal.any(signals)</code></a></li>
134<li><a href="#event-abort">Event: <code>'abort'</code></a></li>
135<li><a href="#abortsignalaborted"><code>abortSignal.aborted</code></a></li>
136<li><a href="#abortsignalonabort"><code>abortSignal.onabort</code></a></li>
137<li><a href="#abortsignalreason"><code>abortSignal.reason</code></a></li>
138<li><a href="#abortsignalthrowifaborted"><code>abortSignal.throwIfAborted()</code></a></li>
139</ul>
140</li>
141</ul>
142</li>
143<li><a href="#class-blob">Class: <code>Blob</code></a></li>
144<li><a href="#class-buffer">Class: <code>Buffer</code></a></li>
145<li><span class="stability_1"><a href="#class-bytelengthqueuingstrategy">Class: <code>ByteLengthQueuingStrategy</code></a></span></li>
146<li><a href="#__dirname"><code>__dirname</code></a></li>
147<li><a href="#__filename"><code>__filename</code></a></li>
148<li><span class="stability_3"><a href="#atobdata"><code>atob(data)</code></a></span></li>
149<li><a href="#broadcastchannel"><code>BroadcastChannel</code></a></li>
150<li><span class="stability_3"><a href="#btoadata"><code>btoa(data)</code></a></span></li>
151<li><a href="#clearimmediateimmediateobject"><code>clearImmediate(immediateObject)</code></a></li>
152<li><a href="#clearintervalintervalobject"><code>clearInterval(intervalObject)</code></a></li>
153<li><a href="#cleartimeouttimeoutobject"><code>clearTimeout(timeoutObject)</code></a></li>
154<li><span class="stability_1"><a href="#class-compressionstream">Class: <code>CompressionStream</code></a></span></li>
155<li><a href="#console"><code>console</code></a></li>
156<li><span class="stability_1"><a href="#class-countqueuingstrategy">Class: <code>CountQueuingStrategy</code></a></span></li>
157<li><span class="stability_1"><a href="#crypto"><code>Crypto</code></a></span></li>
158<li><span class="stability_1"><a href="#crypto_1"><code>crypto</code></a></span></li>
159<li><span class="stability_1"><a href="#cryptokey"><code>CryptoKey</code></a></span></li>
160<li><span class="stability_1"><a href="#customevent"><code>CustomEvent</code></a></span></li>
161<li><span class="stability_1"><a href="#class-decompressionstream">Class: <code>DecompressionStream</code></a></span></li>
162<li><a href="#event"><code>Event</code></a></li>
163<li><a href="#eventtarget"><code>EventTarget</code></a></li>
164<li><a href="#exports"><code>exports</code></a></li>
165<li><span class="stability_1"><a href="#fetch"><code>fetch</code></a></span></li>
166<li><span class="stability_1"><a href="#class-formdata">Class <code>FormData</code></a></span></li>
167<li><span class="stability_3"><a href="#global"><code>global</code></a></span></li>
168<li><span class="stability_1"><a href="#class-headers">Class <code>Headers</code></a></span></li>
169<li><a href="#messagechannel"><code>MessageChannel</code></a></li>
170<li><a href="#messageevent"><code>MessageEvent</code></a></li>
171<li><a href="#messageport"><code>MessagePort</code></a></li>
172<li><a href="#module"><code>module</code></a></li>
173<li><a href="#performance"><code>performance</code></a></li>
174<li><a href="#process"><code>process</code></a></li>
175<li><a href="#queuemicrotaskcallback"><code>queueMicrotask(callback)</code></a></li>
176<li><span class="stability_1"><a href="#class-readablebytestreamcontroller">Class: <code>ReadableByteStreamController</code></a></span></li>
177<li><span class="stability_1"><a href="#class-readablestream">Class: <code>ReadableStream</code></a></span></li>
178<li><span class="stability_1"><a href="#class-readablestreambyobreader">Class: <code>ReadableStreamBYOBReader</code></a></span></li>
179<li><span class="stability_1"><a href="#class-readablestreambyobrequest">Class: <code>ReadableStreamBYOBRequest</code></a></span></li>
180<li><span class="stability_1"><a href="#class-readablestreamdefaultcontroller">Class: <code>ReadableStreamDefaultController</code></a></span></li>
181<li><span class="stability_1"><a href="#class-readablestreamdefaultreader">Class: <code>ReadableStreamDefaultReader</code></a></span></li>
182<li><a href="#require"><code>require()</code></a></li>
183<li><span class="stability_1"><a href="#response"><code>Response</code></a></span></li>
184<li><span class="stability_1"><a href="#request"><code>Request</code></a></span></li>
185<li><a href="#setimmediatecallback-args"><code>setImmediate(callback[, ...args])</code></a></li>
186<li><a href="#setintervalcallback-delay-args"><code>setInterval(callback, delay[, ...args])</code></a></li>
187<li><a href="#settimeoutcallback-delay-args"><code>setTimeout(callback, delay[, ...args])</code></a></li>
188<li><a href="#structuredclonevalue-options"><code>structuredClone(value[, options])</code></a></li>
189<li><span class="stability_1"><a href="#subtlecrypto"><code>SubtleCrypto</code></a></span></li>
190<li><a href="#domexception"><code>DOMException</code></a></li>
191<li><a href="#textdecoder"><code>TextDecoder</code></a></li>
192<li><span class="stability_1"><a href="#class-textdecoderstream">Class: <code>TextDecoderStream</code></a></span></li>
193<li><a href="#textencoder"><code>TextEncoder</code></a></li>
194<li><span class="stability_1"><a href="#class-textencoderstream">Class: <code>TextEncoderStream</code></a></span></li>
195<li><span class="stability_1"><a href="#class-transformstream">Class: <code>TransformStream</code></a></span></li>
196<li><span class="stability_1"><a href="#class-transformstreamdefaultcontroller">Class: <code>TransformStreamDefaultController</code></a></span></li>
197<li><a href="#url"><code>URL</code></a></li>
198<li><a href="#urlsearchparams"><code>URLSearchParams</code></a></li>
199<li><a href="#webassembly"><code>WebAssembly</code></a></li>
200<li><span class="stability_1"><a href="#class-writablestream">Class: <code>WritableStream</code></a></span></li>
201<li><span class="stability_1"><a href="#class-writablestreamdefaultcontroller">Class: <code>WritableStreamDefaultController</code></a></span></li>
202<li><span class="stability_1"><a href="#class-writablestreamdefaultwriter">Class: <code>WritableStreamDefaultWriter</code></a></span></li>
203</ul>
204</li>
205</ul></div></div>
206    </li>
207
208
209    <li class="picker-header">
210      <a href="#">
211        <span class="collapsed-arrow">&#x25ba;</span><span class="expanded-arrow">&#x25bc;</span>
212        Index
213      </a>
214
215      <div class="picker"><ul>
216<li><a href="documentation.html" class="nav-documentation">About this documentation</a></li>
217<li><a href="synopsis.html" class="nav-synopsis">Usage and example</a></li>
218
219      <li>
220        <a href="index.html">Index</a>
221      </li>
222    </ul>
223
224<hr class="line">
225<ul>
226<li><a href="assert.html" class="nav-assert">Assertion testing</a></li>
227<li><a href="async_context.html" class="nav-async_context">Asynchronous context tracking</a></li>
228<li><a href="async_hooks.html" class="nav-async_hooks">Async hooks</a></li>
229<li><a href="buffer.html" class="nav-buffer">Buffer</a></li>
230<li><a href="addons.html" class="nav-addons">C++ addons</a></li>
231<li><a href="n-api.html" class="nav-n-api">C/C++ addons with Node-API</a></li>
232<li><a href="embedding.html" class="nav-embedding">C++ embedder API</a></li>
233<li><a href="child_process.html" class="nav-child_process">Child processes</a></li>
234<li><a href="cluster.html" class="nav-cluster">Cluster</a></li>
235<li><a href="cli.html" class="nav-cli">Command-line options</a></li>
236<li><a href="console.html" class="nav-console">Console</a></li>
237<li><a href="corepack.html" class="nav-corepack">Corepack</a></li>
238<li><a href="crypto.html" class="nav-crypto">Crypto</a></li>
239<li><a href="debugger.html" class="nav-debugger">Debugger</a></li>
240<li><a href="deprecations.html" class="nav-deprecations">Deprecated APIs</a></li>
241<li><a href="diagnostics_channel.html" class="nav-diagnostics_channel">Diagnostics Channel</a></li>
242<li><a href="dns.html" class="nav-dns">DNS</a></li>
243<li><a href="domain.html" class="nav-domain">Domain</a></li>
244<li><a href="errors.html" class="nav-errors">Errors</a></li>
245<li><a href="events.html" class="nav-events">Events</a></li>
246<li><a href="fs.html" class="nav-fs">File system</a></li>
247<li><a href="globals.html" class="nav-globals active">Globals</a></li>
248<li><a href="http.html" class="nav-http">HTTP</a></li>
249<li><a href="http2.html" class="nav-http2">HTTP/2</a></li>
250<li><a href="https.html" class="nav-https">HTTPS</a></li>
251<li><a href="inspector.html" class="nav-inspector">Inspector</a></li>
252<li><a href="intl.html" class="nav-intl">Internationalization</a></li>
253<li><a href="modules.html" class="nav-modules">Modules: CommonJS modules</a></li>
254<li><a href="esm.html" class="nav-esm">Modules: ECMAScript modules</a></li>
255<li><a href="module.html" class="nav-module">Modules: <code>node:module</code> API</a></li>
256<li><a href="packages.html" class="nav-packages">Modules: Packages</a></li>
257<li><a href="net.html" class="nav-net">Net</a></li>
258<li><a href="os.html" class="nav-os">OS</a></li>
259<li><a href="path.html" class="nav-path">Path</a></li>
260<li><a href="perf_hooks.html" class="nav-perf_hooks">Performance hooks</a></li>
261<li><a href="permissions.html" class="nav-permissions">Permissions</a></li>
262<li><a href="process.html" class="nav-process">Process</a></li>
263<li><a href="punycode.html" class="nav-punycode">Punycode</a></li>
264<li><a href="querystring.html" class="nav-querystring">Query strings</a></li>
265<li><a href="readline.html" class="nav-readline">Readline</a></li>
266<li><a href="repl.html" class="nav-repl">REPL</a></li>
267<li><a href="report.html" class="nav-report">Report</a></li>
268<li><a href="single-executable-applications.html" class="nav-single-executable-applications">Single executable applications</a></li>
269<li><a href="stream.html" class="nav-stream">Stream</a></li>
270<li><a href="string_decoder.html" class="nav-string_decoder">String decoder</a></li>
271<li><a href="test.html" class="nav-test">Test runner</a></li>
272<li><a href="timers.html" class="nav-timers">Timers</a></li>
273<li><a href="tls.html" class="nav-tls">TLS/SSL</a></li>
274<li><a href="tracing.html" class="nav-tracing">Trace events</a></li>
275<li><a href="tty.html" class="nav-tty">TTY</a></li>
276<li><a href="dgram.html" class="nav-dgram">UDP/datagram</a></li>
277<li><a href="url.html" class="nav-url">URL</a></li>
278<li><a href="util.html" class="nav-util">Utilities</a></li>
279<li><a href="v8.html" class="nav-v8">V8</a></li>
280<li><a href="vm.html" class="nav-vm">VM</a></li>
281<li><a href="wasi.html" class="nav-wasi">WASI</a></li>
282<li><a href="webcrypto.html" class="nav-webcrypto">Web Crypto API</a></li>
283<li><a href="webstreams.html" class="nav-webstreams">Web Streams API</a></li>
284<li><a href="worker_threads.html" class="nav-worker_threads">Worker threads</a></li>
285<li><a href="zlib.html" class="nav-zlib">Zlib</a></li>
286</ul>
287<hr class="line">
288<ul>
289<li><a href="https://github.com/nodejs/node" class="nav-https-github-com-nodejs-node">Code repository and issue tracker</a></li>
290</ul></div>
291    </li>
292
293
294    <li class="picker-header">
295      <a href="#">
296        <span class="collapsed-arrow">&#x25ba;</span><span class="expanded-arrow">&#x25bc;</span>
297        Other versions
298      </a>
299      <div class="picker"><ol id="alt-docs"><li><a href="https://nodejs.org/docs/latest-v21.x/api/globals.html">21.x</a></li>
300<li><a href="https://nodejs.org/docs/latest-v20.x/api/globals.html">20.x <b>LTS</b></a></li>
301<li><a href="https://nodejs.org/docs/latest-v19.x/api/globals.html">19.x</a></li>
302<li><a href="https://nodejs.org/docs/latest-v18.x/api/globals.html">18.x <b>LTS</b></a></li>
303<li><a href="https://nodejs.org/docs/latest-v17.x/api/globals.html">17.x</a></li>
304<li><a href="https://nodejs.org/docs/latest-v16.x/api/globals.html">16.x</a></li>
305<li><a href="https://nodejs.org/docs/latest-v15.x/api/globals.html">15.x</a></li>
306<li><a href="https://nodejs.org/docs/latest-v14.x/api/globals.html">14.x</a></li>
307<li><a href="https://nodejs.org/docs/latest-v13.x/api/globals.html">13.x</a></li>
308<li><a href="https://nodejs.org/docs/latest-v12.x/api/globals.html">12.x</a></li>
309<li><a href="https://nodejs.org/docs/latest-v11.x/api/globals.html">11.x</a></li>
310<li><a href="https://nodejs.org/docs/latest-v10.x/api/globals.html">10.x</a></li>
311<li><a href="https://nodejs.org/docs/latest-v9.x/api/globals.html">9.x</a></li>
312<li><a href="https://nodejs.org/docs/latest-v8.x/api/globals.html">8.x</a></li>
313<li><a href="https://nodejs.org/docs/latest-v7.x/api/globals.html">7.x</a></li>
314<li><a href="https://nodejs.org/docs/latest-v6.x/api/globals.html">6.x</a></li>
315<li><a href="https://nodejs.org/docs/latest-v5.x/api/globals.html">5.x</a></li>
316<li><a href="https://nodejs.org/docs/latest-v4.x/api/globals.html">4.x</a></li>
317<li><a href="https://nodejs.org/docs/latest-v0.12.x/api/globals.html">0.12.x</a></li>
318<li><a href="https://nodejs.org/docs/latest-v0.10.x/api/globals.html">0.10.x</a></li></ol></div>
319    </li>
320
321            <li class="picker-header">
322              <a href="#">
323                <span class="collapsed-arrow">&#x25ba;</span><span class="expanded-arrow">&#x25bc;</span>
324                Options
325              </a>
326
327              <div class="picker">
328                <ul>
329                  <li>
330                    <a href="all.html">View on single page</a>
331                  </li>
332                  <li>
333                    <a href="globals.json">View as JSON</a>
334                  </li>
335                  <li class="edit_on_github"><a href="https://github.com/nodejs/node/edit/main/doc/api/globals.md">Edit on GitHub</a></li>
336                </ul>
337              </div>
338            </li>
339          </ul>
340        </div>
341        <hr>
342      </header>
343
344      <details id="toc" open><summary>Table of contents</summary><ul>
345<li><a href="#global-objects">Global objects</a>
346<ul>
347<li><a href="#class-abortcontroller">Class: <code>AbortController</code></a>
348<ul>
349<li><a href="#abortcontrollerabortreason"><code>abortController.abort([reason])</code></a></li>
350<li><a href="#abortcontrollersignal"><code>abortController.signal</code></a></li>
351<li><a href="#class-abortsignal">Class: <code>AbortSignal</code></a>
352<ul>
353<li><a href="#static-method-abortsignalabortreason">Static method: <code>AbortSignal.abort([reason])</code></a></li>
354<li><a href="#static-method-abortsignaltimeoutdelay">Static method: <code>AbortSignal.timeout(delay)</code></a></li>
355<li><a href="#static-method-abortsignalanysignals">Static method: <code>AbortSignal.any(signals)</code></a></li>
356<li><a href="#event-abort">Event: <code>'abort'</code></a></li>
357<li><a href="#abortsignalaborted"><code>abortSignal.aborted</code></a></li>
358<li><a href="#abortsignalonabort"><code>abortSignal.onabort</code></a></li>
359<li><a href="#abortsignalreason"><code>abortSignal.reason</code></a></li>
360<li><a href="#abortsignalthrowifaborted"><code>abortSignal.throwIfAborted()</code></a></li>
361</ul>
362</li>
363</ul>
364</li>
365<li><a href="#class-blob">Class: <code>Blob</code></a></li>
366<li><a href="#class-buffer">Class: <code>Buffer</code></a></li>
367<li><span class="stability_1"><a href="#class-bytelengthqueuingstrategy">Class: <code>ByteLengthQueuingStrategy</code></a></span></li>
368<li><a href="#__dirname"><code>__dirname</code></a></li>
369<li><a href="#__filename"><code>__filename</code></a></li>
370<li><span class="stability_3"><a href="#atobdata"><code>atob(data)</code></a></span></li>
371<li><a href="#broadcastchannel"><code>BroadcastChannel</code></a></li>
372<li><span class="stability_3"><a href="#btoadata"><code>btoa(data)</code></a></span></li>
373<li><a href="#clearimmediateimmediateobject"><code>clearImmediate(immediateObject)</code></a></li>
374<li><a href="#clearintervalintervalobject"><code>clearInterval(intervalObject)</code></a></li>
375<li><a href="#cleartimeouttimeoutobject"><code>clearTimeout(timeoutObject)</code></a></li>
376<li><span class="stability_1"><a href="#class-compressionstream">Class: <code>CompressionStream</code></a></span></li>
377<li><a href="#console"><code>console</code></a></li>
378<li><span class="stability_1"><a href="#class-countqueuingstrategy">Class: <code>CountQueuingStrategy</code></a></span></li>
379<li><span class="stability_1"><a href="#crypto"><code>Crypto</code></a></span></li>
380<li><span class="stability_1"><a href="#crypto_1"><code>crypto</code></a></span></li>
381<li><span class="stability_1"><a href="#cryptokey"><code>CryptoKey</code></a></span></li>
382<li><span class="stability_1"><a href="#customevent"><code>CustomEvent</code></a></span></li>
383<li><span class="stability_1"><a href="#class-decompressionstream">Class: <code>DecompressionStream</code></a></span></li>
384<li><a href="#event"><code>Event</code></a></li>
385<li><a href="#eventtarget"><code>EventTarget</code></a></li>
386<li><a href="#exports"><code>exports</code></a></li>
387<li><span class="stability_1"><a href="#fetch"><code>fetch</code></a></span></li>
388<li><span class="stability_1"><a href="#class-formdata">Class <code>FormData</code></a></span></li>
389<li><span class="stability_3"><a href="#global"><code>global</code></a></span></li>
390<li><span class="stability_1"><a href="#class-headers">Class <code>Headers</code></a></span></li>
391<li><a href="#messagechannel"><code>MessageChannel</code></a></li>
392<li><a href="#messageevent"><code>MessageEvent</code></a></li>
393<li><a href="#messageport"><code>MessagePort</code></a></li>
394<li><a href="#module"><code>module</code></a></li>
395<li><a href="#performance"><code>performance</code></a></li>
396<li><a href="#process"><code>process</code></a></li>
397<li><a href="#queuemicrotaskcallback"><code>queueMicrotask(callback)</code></a></li>
398<li><span class="stability_1"><a href="#class-readablebytestreamcontroller">Class: <code>ReadableByteStreamController</code></a></span></li>
399<li><span class="stability_1"><a href="#class-readablestream">Class: <code>ReadableStream</code></a></span></li>
400<li><span class="stability_1"><a href="#class-readablestreambyobreader">Class: <code>ReadableStreamBYOBReader</code></a></span></li>
401<li><span class="stability_1"><a href="#class-readablestreambyobrequest">Class: <code>ReadableStreamBYOBRequest</code></a></span></li>
402<li><span class="stability_1"><a href="#class-readablestreamdefaultcontroller">Class: <code>ReadableStreamDefaultController</code></a></span></li>
403<li><span class="stability_1"><a href="#class-readablestreamdefaultreader">Class: <code>ReadableStreamDefaultReader</code></a></span></li>
404<li><a href="#require"><code>require()</code></a></li>
405<li><span class="stability_1"><a href="#response"><code>Response</code></a></span></li>
406<li><span class="stability_1"><a href="#request"><code>Request</code></a></span></li>
407<li><a href="#setimmediatecallback-args"><code>setImmediate(callback[, ...args])</code></a></li>
408<li><a href="#setintervalcallback-delay-args"><code>setInterval(callback, delay[, ...args])</code></a></li>
409<li><a href="#settimeoutcallback-delay-args"><code>setTimeout(callback, delay[, ...args])</code></a></li>
410<li><a href="#structuredclonevalue-options"><code>structuredClone(value[, options])</code></a></li>
411<li><span class="stability_1"><a href="#subtlecrypto"><code>SubtleCrypto</code></a></span></li>
412<li><a href="#domexception"><code>DOMException</code></a></li>
413<li><a href="#textdecoder"><code>TextDecoder</code></a></li>
414<li><span class="stability_1"><a href="#class-textdecoderstream">Class: <code>TextDecoderStream</code></a></span></li>
415<li><a href="#textencoder"><code>TextEncoder</code></a></li>
416<li><span class="stability_1"><a href="#class-textencoderstream">Class: <code>TextEncoderStream</code></a></span></li>
417<li><span class="stability_1"><a href="#class-transformstream">Class: <code>TransformStream</code></a></span></li>
418<li><span class="stability_1"><a href="#class-transformstreamdefaultcontroller">Class: <code>TransformStreamDefaultController</code></a></span></li>
419<li><a href="#url"><code>URL</code></a></li>
420<li><a href="#urlsearchparams"><code>URLSearchParams</code></a></li>
421<li><a href="#webassembly"><code>WebAssembly</code></a></li>
422<li><span class="stability_1"><a href="#class-writablestream">Class: <code>WritableStream</code></a></span></li>
423<li><span class="stability_1"><a href="#class-writablestreamdefaultcontroller">Class: <code>WritableStreamDefaultController</code></a></span></li>
424<li><span class="stability_1"><a href="#class-writablestreamdefaultwriter">Class: <code>WritableStreamDefaultWriter</code></a></span></li>
425</ul>
426</li>
427</ul></details>
428
429      <div id="apicontent">
430        <h2>Global objects<span><a class="mark" href="#global-objects" id="global-objects">#</a></span><a aria-hidden="true" class="legacy" id="globals_global_objects"></a></h2>
431
432
433<p>These objects are available in all modules. The following variables may appear
434to be global but are not. They exist only in the scope of modules, see the
435<a href="modules.html">module system documentation</a>:</p>
436<ul>
437<li><a href="modules.html#__dirname"><code>__dirname</code></a></li>
438<li><a href="modules.html#__filename"><code>__filename</code></a></li>
439<li><a href="modules.html#exports"><code>exports</code></a></li>
440<li><a href="modules.html#module"><code>module</code></a></li>
441<li><a href="modules.html#requireid"><code>require()</code></a></li>
442</ul>
443<p>The objects listed here are specific to Node.js. There are <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects">built-in objects</a>
444that are part of the JavaScript language itself, which are also globally
445accessible.</p>
446<section><h3>Class: <code>AbortController</code><span><a class="mark" href="#class-abortcontroller" id="class-abortcontroller">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_abortcontroller"></a></h3>
447<div class="api_metadata">
448<details class="changelog"><summary>History</summary>
449<table>
450<tbody><tr><th>Version</th><th>Changes</th></tr>
451<tr><td>v15.4.0</td>
452<td><p>No longer experimental.</p></td></tr>
453<tr><td>v15.0.0, v14.17.0</td>
454<td><p><span>Added in: v15.0.0, v14.17.0</span></p></td></tr>
455</tbody></table>
456</details>
457</div>
458
459<p>A utility class used to signal cancelation in selected <code>Promise</code>-based APIs.
460The API is based on the Web API <a href="https://developer.mozilla.org/en-US/docs/Web/API/AbortController"><code>AbortController</code></a>.</p>
461<pre><code class="language-js"><span class="hljs-keyword">const</span> ac = <span class="hljs-keyword">new</span> <span class="hljs-title class_">AbortController</span>();
462
463ac.<span class="hljs-property">signal</span>.<span class="hljs-title function_">addEventListener</span>(<span class="hljs-string">'abort'</span>, <span class="hljs-function">() =></span> <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'Aborted!'</span>),
464                           { <span class="hljs-attr">once</span>: <span class="hljs-literal">true</span> });
465
466ac.<span class="hljs-title function_">abort</span>();
467
468<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(ac.<span class="hljs-property">signal</span>.<span class="hljs-property">aborted</span>);  <span class="hljs-comment">// Prints true</span></code> <button class="copy-button">copy</button></pre>
469<h4><code>abortController.abort([reason])</code><span><a class="mark" href="#abortcontrollerabortreason" id="abortcontrollerabortreason">#</a></span><a aria-hidden="true" class="legacy" id="globals_abortcontroller_abort_reason"></a></h4>
470<div class="api_metadata">
471<details class="changelog"><summary>History</summary>
472<table>
473<tbody><tr><th>Version</th><th>Changes</th></tr>
474<tr><td>v17.2.0, v16.14.0</td>
475<td><p>Added the new optional reason argument.</p></td></tr>
476<tr><td>v15.0.0, v14.17.0</td>
477<td><p><span>Added in: v15.0.0, v14.17.0</span></p></td></tr>
478</tbody></table>
479</details>
480</div>
481<ul>
482<li><code>reason</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type">&#x3C;any></a> An optional reason, retrievable on the <code>AbortSignal</code>'s
483<code>reason</code> property.</li>
484</ul>
485<p>Triggers the abort signal, causing the <code>abortController.signal</code> to emit
486the <code>'abort'</code> event.</p>
487<h4><code>abortController.signal</code><span><a class="mark" href="#abortcontrollersignal" id="abortcontrollersignal">#</a></span><a aria-hidden="true" class="legacy" id="globals_abortcontroller_signal"></a></h4>
488<div class="api_metadata">
489<span>Added in: v15.0.0, v14.17.0</span>
490</div>
491<ul>
492<li>Type: <a href="globals.html#class-abortsignal" class="type">&#x3C;AbortSignal></a></li>
493</ul>
494<h4>Class: <code>AbortSignal</code><span><a class="mark" href="#class-abortsignal" id="class-abortsignal">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_abortsignal"></a></h4>
495<div class="api_metadata">
496<span>Added in: v15.0.0, v14.17.0</span>
497</div>
498<ul>
499<li>Extends: <a href="events.html#class-eventtarget" class="type">&#x3C;EventTarget></a></li>
500</ul>
501<p>The <code>AbortSignal</code> is used to notify observers when the
502<code>abortController.abort()</code> method is called.</p>
503<h5>Static method: <code>AbortSignal.abort([reason])</code><span><a class="mark" href="#static-method-abortsignalabortreason" id="static-method-abortsignalabortreason">#</a></span><a aria-hidden="true" class="legacy" id="globals_static_method_abortsignal_abort_reason"></a></h5>
504<div class="api_metadata">
505<details class="changelog"><summary>History</summary>
506<table>
507<tbody><tr><th>Version</th><th>Changes</th></tr>
508<tr><td>v17.2.0, v16.14.0</td>
509<td><p>Added the new optional reason argument.</p></td></tr>
510<tr><td>v15.12.0, v14.17.0</td>
511<td><p><span>Added in: v15.12.0, v14.17.0</span></p></td></tr>
512</tbody></table>
513</details>
514</div>
515<ul>
516<li><code>reason</code>: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type">&#x3C;any></a></li>
517<li>Returns: <a href="globals.html#class-abortsignal" class="type">&#x3C;AbortSignal></a></li>
518</ul>
519<p>Returns a new already aborted <code>AbortSignal</code>.</p>
520<h5>Static method: <code>AbortSignal.timeout(delay)</code><span><a class="mark" href="#static-method-abortsignaltimeoutdelay" id="static-method-abortsignaltimeoutdelay">#</a></span><a aria-hidden="true" class="legacy" id="globals_static_method_abortsignal_timeout_delay"></a></h5>
521<div class="api_metadata">
522<span>Added in: v17.3.0, v16.14.0</span>
523</div>
524<ul>
525<li><code>delay</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&#x3C;number></a> The number of milliseconds to wait before triggering
526the AbortSignal.</li>
527</ul>
528<p>Returns a new <code>AbortSignal</code> which will be aborted in <code>delay</code> milliseconds.</p>
529<h5>Static method: <code>AbortSignal.any(signals)</code><span><a class="mark" href="#static-method-abortsignalanysignals" id="static-method-abortsignalanysignals">#</a></span><a aria-hidden="true" class="legacy" id="globals_static_method_abortsignal_any_signals"></a></h5>
530<div class="api_metadata">
531<span>Added in: v18.17.0</span>
532</div>
533<ul>
534<li><code>signals</code> <a href="globals.html#class-abortsignal" class="type">&#x3C;AbortSignal[]></a> The <code>AbortSignal</code>s of which to compose a new <code>AbortSignal</code>.</li>
535</ul>
536<p>Returns a new <code>AbortSignal</code> which will be aborted if any of the provided
537signals are aborted. Its <a href="#abortsignalreason"><code>abortSignal.reason</code></a> will be set to whichever
538one of the <code>signals</code> caused it to be aborted.</p>
539<h5>Event: <code>'abort'</code><span><a class="mark" href="#event-abort" id="event-abort">#</a></span><a aria-hidden="true" class="legacy" id="globals_event_abort"></a></h5>
540<div class="api_metadata">
541<span>Added in: v15.0.0, v14.17.0</span>
542</div>
543<p>The <code>'abort'</code> event is emitted when the <code>abortController.abort()</code> method
544is called. The callback is invoked with a single object argument with a
545single <code>type</code> property set to <code>'abort'</code>:</p>
546<pre><code class="language-js"><span class="hljs-keyword">const</span> ac = <span class="hljs-keyword">new</span> <span class="hljs-title class_">AbortController</span>();
547
548<span class="hljs-comment">// Use either the onabort property...</span>
549ac.<span class="hljs-property">signal</span>.<span class="hljs-property">onabort</span> = <span class="hljs-function">() =></span> <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">'aborted!'</span>);
550
551<span class="hljs-comment">// Or the EventTarget API...</span>
552ac.<span class="hljs-property">signal</span>.<span class="hljs-title function_">addEventListener</span>(<span class="hljs-string">'abort'</span>, <span class="hljs-function">(<span class="hljs-params">event</span>) =></span> {
553  <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(event.<span class="hljs-property">type</span>);  <span class="hljs-comment">// Prints 'abort'</span>
554}, { <span class="hljs-attr">once</span>: <span class="hljs-literal">true</span> });
555
556ac.<span class="hljs-title function_">abort</span>();</code> <button class="copy-button">copy</button></pre>
557<p>The <code>AbortController</code> with which the <code>AbortSignal</code> is associated will only
558ever trigger the <code>'abort'</code> event once. We recommended that code check
559that the <code>abortSignal.aborted</code> attribute is <code>false</code> before adding an <code>'abort'</code>
560event listener.</p>
561<p>Any event listeners attached to the <code>AbortSignal</code> should use the
562<code>{ once: true }</code> option (or, if using the <code>EventEmitter</code> APIs to attach a
563listener, use the <code>once()</code> method) to ensure that the event listener is
564removed as soon as the <code>'abort'</code> event is handled. Failure to do so may
565result in memory leaks.</p>
566<h5><code>abortSignal.aborted</code><span><a class="mark" href="#abortsignalaborted" id="abortsignalaborted">#</a></span><a aria-hidden="true" class="legacy" id="globals_abortsignal_aborted"></a></h5>
567<div class="api_metadata">
568<span>Added in: v15.0.0, v14.17.0</span>
569</div>
570<ul>
571<li>Type: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type" class="type">&#x3C;boolean></a> True after the <code>AbortController</code> has been aborted.</li>
572</ul>
573<h5><code>abortSignal.onabort</code><span><a class="mark" href="#abortsignalonabort" id="abortsignalonabort">#</a></span><a aria-hidden="true" class="legacy" id="globals_abortsignal_onabort"></a></h5>
574<div class="api_metadata">
575<span>Added in: v15.0.0, v14.17.0</span>
576</div>
577<ul>
578<li>Type: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&#x3C;Function></a></li>
579</ul>
580<p>An optional callback function that may be set by user code to be notified
581when the <code>abortController.abort()</code> function has been called.</p>
582<h5><code>abortSignal.reason</code><span><a class="mark" href="#abortsignalreason" id="abortsignalreason">#</a></span><a aria-hidden="true" class="legacy" id="globals_abortsignal_reason"></a></h5>
583<div class="api_metadata">
584<span>Added in: v17.2.0, v16.14.0</span>
585</div>
586<ul>
587<li>Type: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Data_types" class="type">&#x3C;any></a></li>
588</ul>
589<p>An optional reason specified when the <code>AbortSignal</code> was triggered.</p>
590<pre><code class="language-js"><span class="hljs-keyword">const</span> ac = <span class="hljs-keyword">new</span> <span class="hljs-title class_">AbortController</span>();
591ac.<span class="hljs-title function_">abort</span>(<span class="hljs-keyword">new</span> <span class="hljs-title class_">Error</span>(<span class="hljs-string">'boom!'</span>));
592<span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(ac.<span class="hljs-property">signal</span>.<span class="hljs-property">reason</span>);  <span class="hljs-comment">// Error: boom!</span></code> <button class="copy-button">copy</button></pre>
593<h5><code>abortSignal.throwIfAborted()</code><span><a class="mark" href="#abortsignalthrowifaborted" id="abortsignalthrowifaborted">#</a></span><a aria-hidden="true" class="legacy" id="globals_abortsignal_throwifaborted"></a></h5>
594<div class="api_metadata">
595<span>Added in: v17.3.0</span>
596</div>
597<p>If <code>abortSignal.aborted</code> is <code>true</code>, throws <code>abortSignal.reason</code>.</p>
598</section><section><h3>Class: <code>Blob</code><span><a class="mark" href="#class-blob" id="class-blob">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_blob"></a></h3>
599<div class="api_metadata">
600<span>Added in: v18.0.0</span>
601</div>
602
603<p>See <a href="buffer.html#class-blob" class="type">&#x3C;Blob></a>.</p>
604</section><section><h3>Class: <code>Buffer</code><span><a class="mark" href="#class-buffer" id="class-buffer">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_buffer"></a></h3>
605<div class="api_metadata">
606<span>Added in: v0.1.103</span>
607</div>
608
609<ul>
610<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&#x3C;Function></a></li>
611</ul>
612<p>Used to handle binary data. See the <a href="buffer.html">buffer section</a>.</p>
613</section><section><h3>Class: <code>ByteLengthQueuingStrategy</code><span><a class="mark" href="#class-bytelengthqueuingstrategy" id="class-bytelengthqueuingstrategy">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_bytelengthqueuingstrategy"></a></h3>
614<div class="api_metadata">
615<span>Added in: v18.0.0</span>
616</div>
617<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
618<p>A browser-compatible implementation of <a href="webstreams.html#class-bytelengthqueuingstrategy"><code>ByteLengthQueuingStrategy</code></a>.</p>
619</section><section><h3><code>__dirname</code><span><a class="mark" href="#__dirname" id="__dirname">#</a></span><a aria-hidden="true" class="legacy" id="globals_dirname"></a></h3>
620<p>This variable may appear to be global but is not. See <a href="modules.html#__dirname"><code>__dirname</code></a>.</p>
621</section><section><h3><code>__filename</code><span><a class="mark" href="#__filename" id="__filename">#</a></span><a aria-hidden="true" class="legacy" id="globals_filename"></a></h3>
622<p>This variable may appear to be global but is not. See <a href="modules.html#__filename"><code>__filename</code></a>.</p>
623</section><section><h3><code>atob(data)</code><span><a class="mark" href="#atobdata" id="atobdata">#</a></span><a aria-hidden="true" class="legacy" id="globals_atob_data"></a></h3>
624<div class="api_metadata">
625<span>Added in: v16.0.0</span>
626</div>
627<p></p><div class="api_stability api_stability_3"><a href="documentation.html#stability-index">Stability: 3</a> - Legacy. Use <code>Buffer.from(data, 'base64')</code> instead.</div><p></p>
628<p>Global alias for <a href="buffer.html#bufferatobdata"><code>buffer.atob()</code></a>.</p>
629</section><section><h3><code>BroadcastChannel</code><span><a class="mark" href="#broadcastchannel" id="broadcastchannel">#</a></span><a aria-hidden="true" class="legacy" id="globals_broadcastchannel"></a></h3>
630<div class="api_metadata">
631<span>Added in: v18.0.0</span>
632</div>
633<p>See <a href="worker_threads.html#class-broadcastchannel-extends-eventtarget" class="type">&#x3C;BroadcastChannel></a>.</p>
634</section><section><h3><code>btoa(data)</code><span><a class="mark" href="#btoadata" id="btoadata">#</a></span><a aria-hidden="true" class="legacy" id="globals_btoa_data"></a></h3>
635<div class="api_metadata">
636<span>Added in: v16.0.0</span>
637</div>
638<p></p><div class="api_stability api_stability_3"><a href="documentation.html#stability-index">Stability: 3</a> - Legacy. Use <code>buf.toString('base64')</code> instead.</div><p></p>
639<p>Global alias for <a href="buffer.html#bufferbtoadata"><code>buffer.btoa()</code></a>.</p>
640</section><section><h3><code>clearImmediate(immediateObject)</code><span><a class="mark" href="#clearimmediateimmediateobject" id="clearimmediateimmediateobject">#</a></span><a aria-hidden="true" class="legacy" id="globals_clearimmediate_immediateobject"></a></h3>
641<div class="api_metadata">
642<span>Added in: v0.9.1</span>
643</div>
644
645<p><a href="timers.html#clearimmediateimmediate"><code>clearImmediate</code></a> is described in the <a href="timers.html">timers</a> section.</p>
646</section><section><h3><code>clearInterval(intervalObject)</code><span><a class="mark" href="#clearintervalintervalobject" id="clearintervalintervalobject">#</a></span><a aria-hidden="true" class="legacy" id="globals_clearinterval_intervalobject"></a></h3>
647<div class="api_metadata">
648<span>Added in: v0.0.1</span>
649</div>
650
651<p><a href="timers.html#clearintervaltimeout"><code>clearInterval</code></a> is described in the <a href="timers.html">timers</a> section.</p>
652</section><section><h3><code>clearTimeout(timeoutObject)</code><span><a class="mark" href="#cleartimeouttimeoutobject" id="cleartimeouttimeoutobject">#</a></span><a aria-hidden="true" class="legacy" id="globals_cleartimeout_timeoutobject"></a></h3>
653<div class="api_metadata">
654<span>Added in: v0.0.1</span>
655</div>
656
657<p><a href="timers.html#cleartimeouttimeout"><code>clearTimeout</code></a> is described in the <a href="timers.html">timers</a> section.</p>
658</section><section><h3>Class: <code>CompressionStream</code><span><a class="mark" href="#class-compressionstream" id="class-compressionstream">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_compressionstream"></a></h3>
659<div class="api_metadata">
660<span>Added in: v18.0.0</span>
661</div>
662<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
663<p>A browser-compatible implementation of <a href="webstreams.html#class-compressionstream"><code>CompressionStream</code></a>.</p>
664</section><section><h3><code>console</code><span><a class="mark" href="#console" id="console">#</a></span><a aria-hidden="true" class="legacy" id="globals_console"></a></h3>
665<div class="api_metadata">
666<span>Added in: v0.1.100</span>
667</div>
668
669<ul>
670<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&#x3C;Object></a></li>
671</ul>
672<p>Used to print to stdout and stderr. See the <a href="console.html"><code>console</code></a> section.</p>
673</section><section><h3>Class: <code>CountQueuingStrategy</code><span><a class="mark" href="#class-countqueuingstrategy" id="class-countqueuingstrategy">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_countqueuingstrategy"></a></h3>
674<div class="api_metadata">
675<span>Added in: v18.0.0</span>
676</div>
677<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
678<p>A browser-compatible implementation of <a href="webstreams.html#class-countqueuingstrategy"><code>CountQueuingStrategy</code></a>.</p>
679</section><section><h3><code>Crypto</code><span><a class="mark" href="#crypto" id="crypto">#</a></span><a aria-hidden="true" class="legacy" id="globals_crypto"></a></h3>
680<div class="api_metadata">
681<span>Added in: v17.6.0</span>
682</div>
683<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Enable this API with the
684<a href="cli.html#--experimental-global-webcrypto"><code>--experimental-global-webcrypto</code></a> CLI flag.</div><p></p>
685<p>A browser-compatible implementation of <a href="webcrypto.html#class-crypto" class="type">&#x3C;Crypto></a>. This global is available
686only if the Node.js binary was compiled with including support for the
687<code>node:crypto</code> module.</p>
688</section><section><h3><code>crypto</code><span><a class="mark" href="#crypto_1" id="crypto_1">#</a></span><a aria-hidden="true" class="legacy" id="globals_crypto_1"></a></h3>
689<div class="api_metadata">
690<span>Added in: v17.6.0</span>
691</div>
692<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Enable this API with the
693<a href="cli.html#--experimental-global-webcrypto"><code>--experimental-global-webcrypto</code></a> CLI flag.</div><p></p>
694<p>A browser-compatible implementation of the <a href="webcrypto.html">Web Crypto API</a>.</p>
695</section><section><h3><code>CryptoKey</code><span><a class="mark" href="#cryptokey" id="cryptokey">#</a></span><a aria-hidden="true" class="legacy" id="globals_cryptokey"></a></h3>
696<div class="api_metadata">
697<span>Added in: v17.6.0</span>
698</div>
699<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Enable this API with the
700<a href="cli.html#--experimental-global-webcrypto"><code>--experimental-global-webcrypto</code></a> CLI flag.</div><p></p>
701<p>A browser-compatible implementation of <a href="webcrypto.html#class-cryptokey" class="type">&#x3C;CryptoKey></a>. This global is available
702only if the Node.js binary was compiled with including support for the
703<code>node:crypto</code> module.</p>
704</section><section><h3><code>CustomEvent</code><span><a class="mark" href="#customevent" id="customevent">#</a></span><a aria-hidden="true" class="legacy" id="globals_customevent"></a></h3>
705<div class="api_metadata">
706<span>Added in: v18.7.0</span>
707</div>
708<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Enable this API with the
709<a href="cli.html#--experimental-global-customevent"><code>--experimental-global-customevent</code></a> CLI flag.</div><p></p>
710
711<p>A browser-compatible implementation of the <a href="https://dom.spec.whatwg.org/#customevent"><code>CustomEvent</code> Web API</a>.</p>
712</section><section><h3>Class: <code>DecompressionStream</code><span><a class="mark" href="#class-decompressionstream" id="class-decompressionstream">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_decompressionstream"></a></h3>
713<div class="api_metadata">
714<span>Added in: v18.0.0</span>
715</div>
716<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
717<p>A browser-compatible implementation of <a href="webstreams.html#class-decompressionstream"><code>DecompressionStream</code></a>.</p>
718</section><section><h3><code>Event</code><span><a class="mark" href="#event" id="event">#</a></span><a aria-hidden="true" class="legacy" id="globals_event"></a></h3>
719<div class="api_metadata">
720<details class="changelog"><summary>History</summary>
721<table>
722<tbody><tr><th>Version</th><th>Changes</th></tr>
723<tr><td>v15.4.0</td>
724<td><p>No longer experimental.</p></td></tr>
725<tr><td>v15.0.0</td>
726<td><p><span>Added in: v15.0.0</span></p></td></tr>
727</tbody></table>
728</details>
729</div>
730
731<p>A browser-compatible implementation of the <code>Event</code> class. See
732<a href="events.html#eventtarget-and-event-api"><code>EventTarget</code> and <code>Event</code> API</a> for more details.</p>
733</section><section><h3><code>EventTarget</code><span><a class="mark" href="#eventtarget" id="eventtarget">#</a></span><a aria-hidden="true" class="legacy" id="globals_eventtarget"></a></h3>
734<div class="api_metadata">
735<details class="changelog"><summary>History</summary>
736<table>
737<tbody><tr><th>Version</th><th>Changes</th></tr>
738<tr><td>v15.4.0</td>
739<td><p>No longer experimental.</p></td></tr>
740<tr><td>v15.0.0</td>
741<td><p><span>Added in: v15.0.0</span></p></td></tr>
742</tbody></table>
743</details>
744</div>
745
746<p>A browser-compatible implementation of the <code>EventTarget</code> class. See
747<a href="events.html#eventtarget-and-event-api"><code>EventTarget</code> and <code>Event</code> API</a> for more details.</p>
748</section><section><h3><code>exports</code><span><a class="mark" href="#exports" id="exports">#</a></span><a aria-hidden="true" class="legacy" id="globals_exports"></a></h3>
749<p>This variable may appear to be global but is not. See <a href="modules.html#exports"><code>exports</code></a>.</p>
750</section><section><h3><code>fetch</code><span><a class="mark" href="#fetch" id="fetch">#</a></span><a aria-hidden="true" class="legacy" id="globals_fetch"></a></h3>
751<div class="api_metadata">
752<details class="changelog"><summary>History</summary>
753<table>
754<tbody><tr><th>Version</th><th>Changes</th></tr>
755<tr><td>v18.0.0</td>
756<td><p>No longer behind <code>--experimental-fetch</code> CLI flag.</p></td></tr>
757<tr><td>v17.5.0</td>
758<td><p><span>Added in: v17.5.0</span></p></td></tr>
759</tbody></table>
760</details>
761</div>
762<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Disable this API with the <a href="cli.html#--no-experimental-fetch"><code>--no-experimental-fetch</code></a>
763CLI flag.</div><p></p>
764<p>A browser-compatible implementation of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/fetch"><code>fetch()</code></a> function.</p>
765</section><section><h3>Class <code>FormData</code><span><a class="mark" href="#class-formdata" id="class-formdata">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_formdata"></a></h3>
766<div class="api_metadata">
767<details class="changelog"><summary>History</summary>
768<table>
769<tbody><tr><th>Version</th><th>Changes</th></tr>
770<tr><td>v18.0.0</td>
771<td><p>No longer behind <code>--experimental-fetch</code> CLI flag.</p></td></tr>
772<tr><td>v17.6.0</td>
773<td><p><span>Added in: v17.6.0</span></p></td></tr>
774</tbody></table>
775</details>
776</div>
777<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Disable this API with the <a href="cli.html#--no-experimental-fetch"><code>--no-experimental-fetch</code></a>
778CLI flag.</div><p></p>
779<p>A browser-compatible implementation of <a href="https://developer.mozilla.org/en-US/docs/Web/API/FormData" class="type">&#x3C;FormData></a>.</p>
780</section><section><h3><code>global</code><span><a class="mark" href="#global" id="global">#</a></span><a aria-hidden="true" class="legacy" id="globals_global"></a></h3>
781<div class="api_metadata">
782<span>Added in: v0.1.27</span>
783</div>
784
785<p></p><div class="api_stability api_stability_3"><a href="documentation.html#stability-index">Stability: 3</a> - Legacy. Use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis"><code>globalThis</code></a> instead.</div><p></p>
786<ul>
787<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&#x3C;Object></a> The global namespace object.</li>
788</ul>
789<p>In browsers, the top-level scope has traditionally been the global scope. This
790means that <code>var something</code> will define a new global variable, except within
791ECMAScript modules. In Node.js, this is different. The top-level scope is not
792the global scope; <code>var something</code> inside a Node.js module will be local to that
793module, regardless of whether it is a <a href="modules.html">CommonJS module</a> or an
794<a href="esm.html">ECMAScript module</a>.</p>
795</section><section><h3>Class <code>Headers</code><span><a class="mark" href="#class-headers" id="class-headers">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_headers"></a></h3>
796<div class="api_metadata">
797<details class="changelog"><summary>History</summary>
798<table>
799<tbody><tr><th>Version</th><th>Changes</th></tr>
800<tr><td>v18.0.0</td>
801<td><p>No longer behind <code>--experimental-fetch</code> CLI flag.</p></td></tr>
802<tr><td>v17.5.0</td>
803<td><p><span>Added in: v17.5.0</span></p></td></tr>
804</tbody></table>
805</details>
806</div>
807<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Disable this API with the <a href="cli.html#--no-experimental-fetch"><code>--no-experimental-fetch</code></a>
808CLI flag.</div><p></p>
809<p>A browser-compatible implementation of <a href="https://developer.mozilla.org/en-US/docs/Web/API/Headers" class="type">&#x3C;Headers></a>.</p>
810</section><section><h3><code>MessageChannel</code><span><a class="mark" href="#messagechannel" id="messagechannel">#</a></span><a aria-hidden="true" class="legacy" id="globals_messagechannel"></a></h3>
811<div class="api_metadata">
812<span>Added in: v15.0.0</span>
813</div>
814
815<p>The <code>MessageChannel</code> class. See <a href="worker_threads.html#class-messagechannel"><code>MessageChannel</code></a> for more details.</p>
816</section><section><h3><code>MessageEvent</code><span><a class="mark" href="#messageevent" id="messageevent">#</a></span><a aria-hidden="true" class="legacy" id="globals_messageevent"></a></h3>
817<div class="api_metadata">
818<span>Added in: v15.0.0</span>
819</div>
820
821<p>The <code>MessageEvent</code> class. See <a href="https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent"><code>MessageEvent</code></a> for more details.</p>
822</section><section><h3><code>MessagePort</code><span><a class="mark" href="#messageport" id="messageport">#</a></span><a aria-hidden="true" class="legacy" id="globals_messageport"></a></h3>
823<div class="api_metadata">
824<span>Added in: v15.0.0</span>
825</div>
826
827<p>The <code>MessagePort</code> class. See <a href="worker_threads.html#class-messageport"><code>MessagePort</code></a> for more details.</p>
828</section><section><h3><code>module</code><span><a class="mark" href="#module" id="module">#</a></span><a aria-hidden="true" class="legacy" id="globals_module"></a></h3>
829<p>This variable may appear to be global but is not. See <a href="modules.html#module"><code>module</code></a>.</p>
830</section><section><h3><code>performance</code><span><a class="mark" href="#performance" id="performance">#</a></span><a aria-hidden="true" class="legacy" id="globals_performance"></a></h3>
831<div class="api_metadata">
832<span>Added in: v16.0.0</span>
833</div>
834<p>The <a href="perf_hooks.html#perf_hooksperformance"><code>perf_hooks.performance</code></a> object.</p>
835</section><section><h3><code>process</code><span><a class="mark" href="#process" id="process">#</a></span><a aria-hidden="true" class="legacy" id="globals_process"></a></h3>
836<div class="api_metadata">
837<span>Added in: v0.1.7</span>
838</div>
839
840<ul>
841<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&#x3C;Object></a></li>
842</ul>
843<p>The process object. See the <a href="process.html#process"><code>process</code> object</a> section.</p>
844</section><section><h3><code>queueMicrotask(callback)</code><span><a class="mark" href="#queuemicrotaskcallback" id="queuemicrotaskcallback">#</a></span><a aria-hidden="true" class="legacy" id="globals_queuemicrotask_callback"></a></h3>
845<div class="api_metadata">
846<span>Added in: v11.0.0</span>
847</div>
848
849<ul>
850<li><code>callback</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function" class="type">&#x3C;Function></a> Function to be queued.</li>
851</ul>
852<p>The <code>queueMicrotask()</code> method queues a microtask to invoke <code>callback</code>. If
853<code>callback</code> throws an exception, the <a href="process.html#process"><code>process</code> object</a> <code>'uncaughtException'</code>
854event will be emitted.</p>
855<p>The microtask queue is managed by V8 and may be used in a similar manner to
856the <a href="process.html#processnexttickcallback-args"><code>process.nextTick()</code></a> queue, which is managed by Node.js. The
857<code>process.nextTick()</code> queue is always processed before the microtask queue
858within each turn of the Node.js event loop.</p>
859<pre><code class="language-js"><span class="hljs-comment">// Here, `queueMicrotask()` is used to ensure the 'load' event is always</span>
860<span class="hljs-comment">// emitted asynchronously, and therefore consistently. Using</span>
861<span class="hljs-comment">// `process.nextTick()` here would result in the 'load' event always emitting</span>
862<span class="hljs-comment">// before any other promise jobs.</span>
863
864<span class="hljs-title class_">DataHandler</span>.<span class="hljs-property"><span class="hljs-keyword">prototype</span></span>.<span class="hljs-property">load</span> = <span class="hljs-keyword">async</span> <span class="hljs-keyword">function</span> <span class="hljs-title function_">load</span>(<span class="hljs-params">key</span>) {
865  <span class="hljs-keyword">const</span> hit = <span class="hljs-variable language_">this</span>.<span class="hljs-property">_cache</span>.<span class="hljs-title function_">get</span>(key);
866  <span class="hljs-keyword">if</span> (hit !== <span class="hljs-literal">undefined</span>) {
867    <span class="hljs-title function_">queueMicrotask</span>(<span class="hljs-function">() =></span> {
868      <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">emit</span>(<span class="hljs-string">'load'</span>, hit);
869    });
870    <span class="hljs-keyword">return</span>;
871  }
872
873  <span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> <span class="hljs-title function_">fetchData</span>(key);
874  <span class="hljs-variable language_">this</span>.<span class="hljs-property">_cache</span>.<span class="hljs-title function_">set</span>(key, data);
875  <span class="hljs-variable language_">this</span>.<span class="hljs-title function_">emit</span>(<span class="hljs-string">'load'</span>, data);
876};</code> <button class="copy-button">copy</button></pre>
877</section><section><h3>Class: <code>ReadableByteStreamController</code><span><a class="mark" href="#class-readablebytestreamcontroller" id="class-readablebytestreamcontroller">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_readablebytestreamcontroller"></a></h3>
878<div class="api_metadata">
879<span>Added in: v18.0.0</span>
880</div>
881<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
882<p>A browser-compatible implementation of <a href="webstreams.html#class-readablebytestreamcontroller"><code>ReadableByteStreamController</code></a>.</p>
883</section><section><h3>Class: <code>ReadableStream</code><span><a class="mark" href="#class-readablestream" id="class-readablestream">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_readablestream"></a></h3>
884<div class="api_metadata">
885<span>Added in: v18.0.0</span>
886</div>
887<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
888<p>A browser-compatible implementation of <a href="webstreams.html#class-readablestream"><code>ReadableStream</code></a>.</p>
889</section><section><h3>Class: <code>ReadableStreamBYOBReader</code><span><a class="mark" href="#class-readablestreambyobreader" id="class-readablestreambyobreader">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_readablestreambyobreader"></a></h3>
890<div class="api_metadata">
891<span>Added in: v18.0.0</span>
892</div>
893<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
894<p>A browser-compatible implementation of <a href="webstreams.html#class-readablestreambyobreader"><code>ReadableStreamBYOBReader</code></a>.</p>
895</section><section><h3>Class: <code>ReadableStreamBYOBRequest</code><span><a class="mark" href="#class-readablestreambyobrequest" id="class-readablestreambyobrequest">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_readablestreambyobrequest"></a></h3>
896<div class="api_metadata">
897<span>Added in: v18.0.0</span>
898</div>
899<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
900<p>A browser-compatible implementation of <a href="webstreams.html#class-readablestreambyobrequest"><code>ReadableStreamBYOBRequest</code></a>.</p>
901</section><section><h3>Class: <code>ReadableStreamDefaultController</code><span><a class="mark" href="#class-readablestreamdefaultcontroller" id="class-readablestreamdefaultcontroller">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_readablestreamdefaultcontroller"></a></h3>
902<div class="api_metadata">
903<span>Added in: v18.0.0</span>
904</div>
905<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
906<p>A browser-compatible implementation of <a href="webstreams.html#class-readablestreamdefaultcontroller"><code>ReadableStreamDefaultController</code></a>.</p>
907</section><section><h3>Class: <code>ReadableStreamDefaultReader</code><span><a class="mark" href="#class-readablestreamdefaultreader" id="class-readablestreamdefaultreader">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_readablestreamdefaultreader"></a></h3>
908<div class="api_metadata">
909<span>Added in: v18.0.0</span>
910</div>
911<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
912<p>A browser-compatible implementation of <a href="webstreams.html#class-readablestreamdefaultreader"><code>ReadableStreamDefaultReader</code></a>.</p>
913</section><section><h3><code>require()</code><span><a class="mark" href="#require" id="require">#</a></span><a aria-hidden="true" class="legacy" id="globals_require"></a></h3>
914<p>This variable may appear to be global but is not. See <a href="modules.html#requireid"><code>require()</code></a>.</p>
915</section><section><h3><code>Response</code><span><a class="mark" href="#response" id="response">#</a></span><a aria-hidden="true" class="legacy" id="globals_response"></a></h3>
916<div class="api_metadata">
917<details class="changelog"><summary>History</summary>
918<table>
919<tbody><tr><th>Version</th><th>Changes</th></tr>
920<tr><td>v18.0.0</td>
921<td><p>No longer behind <code>--experimental-fetch</code> CLI flag.</p></td></tr>
922<tr><td>v17.5.0</td>
923<td><p><span>Added in: v17.5.0</span></p></td></tr>
924</tbody></table>
925</details>
926</div>
927<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Disable this API with the <a href="cli.html#--no-experimental-fetch"><code>--no-experimental-fetch</code></a>
928CLI flag.</div><p></p>
929<p>A browser-compatible implementation of <a href="https://developer.mozilla.org/en-US/docs/Web/API/Response" class="type">&#x3C;Response></a>.</p>
930</section><section><h3><code>Request</code><span><a class="mark" href="#request" id="request">#</a></span><a aria-hidden="true" class="legacy" id="globals_request"></a></h3>
931<div class="api_metadata">
932<details class="changelog"><summary>History</summary>
933<table>
934<tbody><tr><th>Version</th><th>Changes</th></tr>
935<tr><td>v18.0.0</td>
936<td><p>No longer behind <code>--experimental-fetch</code> CLI flag.</p></td></tr>
937<tr><td>v17.5.0</td>
938<td><p><span>Added in: v17.5.0</span></p></td></tr>
939</tbody></table>
940</details>
941</div>
942<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Disable this API with the <a href="cli.html#--no-experimental-fetch"><code>--no-experimental-fetch</code></a>
943CLI flag.</div><p></p>
944<p>A browser-compatible implementation of <a href="https://developer.mozilla.org/en-US/docs/Web/API/Request" class="type">&#x3C;Request></a>.</p>
945</section><section><h3><code>setImmediate(callback[, ...args])</code><span><a class="mark" href="#setimmediatecallback-args" id="setimmediatecallback-args">#</a></span><a aria-hidden="true" class="legacy" id="globals_setimmediate_callback_args"></a></h3>
946<div class="api_metadata">
947<span>Added in: v0.9.1</span>
948</div>
949
950<p><a href="timers.html#setimmediatecallback-args"><code>setImmediate</code></a> is described in the <a href="timers.html">timers</a> section.</p>
951</section><section><h3><code>setInterval(callback, delay[, ...args])</code><span><a class="mark" href="#setintervalcallback-delay-args" id="setintervalcallback-delay-args">#</a></span><a aria-hidden="true" class="legacy" id="globals_setinterval_callback_delay_args"></a></h3>
952<div class="api_metadata">
953<span>Added in: v0.0.1</span>
954</div>
955
956<p><a href="timers.html#setintervalcallback-delay-args"><code>setInterval</code></a> is described in the <a href="timers.html">timers</a> section.</p>
957</section><section><h3><code>setTimeout(callback, delay[, ...args])</code><span><a class="mark" href="#settimeoutcallback-delay-args" id="settimeoutcallback-delay-args">#</a></span><a aria-hidden="true" class="legacy" id="globals_settimeout_callback_delay_args"></a></h3>
958<div class="api_metadata">
959<span>Added in: v0.0.1</span>
960</div>
961
962<p><a href="timers.html#settimeoutcallback-delay-args"><code>setTimeout</code></a> is described in the <a href="timers.html">timers</a> section.</p>
963</section><section><h3><code>structuredClone(value[, options])</code><span><a class="mark" href="#structuredclonevalue-options" id="structuredclonevalue-options">#</a></span><a aria-hidden="true" class="legacy" id="globals_structuredclone_value_options"></a></h3>
964<div class="api_metadata">
965<span>Added in: v17.0.0</span>
966</div>
967
968<p>The WHATWG <a href="https://developer.mozilla.org/en-US/docs/Web/API/structuredClone"><code>structuredClone</code></a> method.</p>
969</section><section><h3><code>SubtleCrypto</code><span><a class="mark" href="#subtlecrypto" id="subtlecrypto">#</a></span><a aria-hidden="true" class="legacy" id="globals_subtlecrypto"></a></h3>
970<div class="api_metadata">
971<span>Added in: v17.6.0</span>
972</div>
973<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental. Enable this API with the
974<a href="cli.html#--experimental-global-webcrypto"><code>--experimental-global-webcrypto</code></a> CLI flag.</div><p></p>
975<p>A browser-compatible implementation of <a href="webcrypto.html#class-subtlecrypto" class="type">&#x3C;SubtleCrypto></a>. This global is available
976only if the Node.js binary was compiled with including support for the
977<code>node:crypto</code> module.</p>
978</section><section><h3><code>DOMException</code><span><a class="mark" href="#domexception" id="domexception">#</a></span><a aria-hidden="true" class="legacy" id="globals_domexception"></a></h3>
979<div class="api_metadata">
980<span>Added in: v17.0.0</span>
981</div>
982
983<p>The WHATWG <code>DOMException</code> class. See <a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMException"><code>DOMException</code></a> for more details.</p>
984</section><section><h3><code>TextDecoder</code><span><a class="mark" href="#textdecoder" id="textdecoder">#</a></span><a aria-hidden="true" class="legacy" id="globals_textdecoder"></a></h3>
985<div class="api_metadata">
986<span>Added in: v11.0.0</span>
987</div>
988
989<p>The WHATWG <code>TextDecoder</code> class. See the <a href="util.html#class-utiltextdecoder"><code>TextDecoder</code></a> section.</p>
990</section><section><h3>Class: <code>TextDecoderStream</code><span><a class="mark" href="#class-textdecoderstream" id="class-textdecoderstream">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_textdecoderstream"></a></h3>
991<div class="api_metadata">
992<span>Added in: v18.0.0</span>
993</div>
994<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
995<p>A browser-compatible implementation of <a href="webstreams.html#class-textdecoderstream"><code>TextDecoderStream</code></a>.</p>
996</section><section><h3><code>TextEncoder</code><span><a class="mark" href="#textencoder" id="textencoder">#</a></span><a aria-hidden="true" class="legacy" id="globals_textencoder"></a></h3>
997<div class="api_metadata">
998<span>Added in: v11.0.0</span>
999</div>
1000
1001<p>The WHATWG <code>TextEncoder</code> class. See the <a href="util.html#class-utiltextencoder"><code>TextEncoder</code></a> section.</p>
1002</section><section><h3>Class: <code>TextEncoderStream</code><span><a class="mark" href="#class-textencoderstream" id="class-textencoderstream">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_textencoderstream"></a></h3>
1003<div class="api_metadata">
1004<span>Added in: v18.0.0</span>
1005</div>
1006<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
1007<p>A browser-compatible implementation of <a href="webstreams.html#class-textencoderstream"><code>TextEncoderStream</code></a>.</p>
1008</section><section><h3>Class: <code>TransformStream</code><span><a class="mark" href="#class-transformstream" id="class-transformstream">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_transformstream"></a></h3>
1009<div class="api_metadata">
1010<span>Added in: v18.0.0</span>
1011</div>
1012<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
1013<p>A browser-compatible implementation of <a href="webstreams.html#class-transformstream"><code>TransformStream</code></a>.</p>
1014</section><section><h3>Class: <code>TransformStreamDefaultController</code><span><a class="mark" href="#class-transformstreamdefaultcontroller" id="class-transformstreamdefaultcontroller">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_transformstreamdefaultcontroller"></a></h3>
1015<div class="api_metadata">
1016<span>Added in: v18.0.0</span>
1017</div>
1018<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
1019<p>A browser-compatible implementation of <a href="webstreams.html#class-transformstreamdefaultcontroller"><code>TransformStreamDefaultController</code></a>.</p>
1020</section><section><h3><code>URL</code><span><a class="mark" href="#url" id="url">#</a></span><a aria-hidden="true" class="legacy" id="globals_url"></a></h3>
1021<div class="api_metadata">
1022<span>Added in: v10.0.0</span>
1023</div>
1024
1025<p>The WHATWG <code>URL</code> class. See the <a href="url.html#class-url"><code>URL</code></a> section.</p>
1026</section><section><h3><code>URLSearchParams</code><span><a class="mark" href="#urlsearchparams" id="urlsearchparams">#</a></span><a aria-hidden="true" class="legacy" id="globals_urlsearchparams"></a></h3>
1027<div class="api_metadata">
1028<span>Added in: v10.0.0</span>
1029</div>
1030
1031<p>The WHATWG <code>URLSearchParams</code> class. See the <a href="url.html#class-urlsearchparams"><code>URLSearchParams</code></a> section.</p>
1032</section><section><h3><code>WebAssembly</code><span><a class="mark" href="#webassembly" id="webassembly">#</a></span><a aria-hidden="true" class="legacy" id="globals_webassembly"></a></h3>
1033<div class="api_metadata">
1034<span>Added in: v8.0.0</span>
1035</div>
1036
1037<ul>
1038<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object" class="type">&#x3C;Object></a></li>
1039</ul>
1040<p>The object that acts as the namespace for all W3C
1041<a href="https://webassembly.org">WebAssembly</a> related functionality. See the
1042<a href="https://developer.mozilla.org/en-US/docs/WebAssembly">Mozilla Developer Network</a> for usage and compatibility.</p>
1043</section><section><h3>Class: <code>WritableStream</code><span><a class="mark" href="#class-writablestream" id="class-writablestream">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_writablestream"></a></h3>
1044<div class="api_metadata">
1045<span>Added in: v18.0.0</span>
1046</div>
1047<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
1048<p>A browser-compatible implementation of <a href="webstreams.html#class-writablestream"><code>WritableStream</code></a>.</p>
1049</section><section><h3>Class: <code>WritableStreamDefaultController</code><span><a class="mark" href="#class-writablestreamdefaultcontroller" id="class-writablestreamdefaultcontroller">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_writablestreamdefaultcontroller"></a></h3>
1050<div class="api_metadata">
1051<span>Added in: v18.0.0</span>
1052</div>
1053<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
1054<p>A browser-compatible implementation of <a href="webstreams.html#class-writablestreamdefaultcontroller"><code>WritableStreamDefaultController</code></a>.</p>
1055</section><section><h3>Class: <code>WritableStreamDefaultWriter</code><span><a class="mark" href="#class-writablestreamdefaultwriter" id="class-writablestreamdefaultwriter">#</a></span><a aria-hidden="true" class="legacy" id="globals_class_writablestreamdefaultwriter"></a></h3>
1056<div class="api_metadata">
1057<span>Added in: v18.0.0</span>
1058</div>
1059<p></p><div class="api_stability api_stability_1"><a href="documentation.html#stability-index">Stability: 1</a> - Experimental.</div><p></p>
1060<p>A browser-compatible implementation of <a href="webstreams.html#class-writablestreamdefaultwriter"><code>WritableStreamDefaultWriter</code></a>.</p></section>
1061        <!-- API END -->
1062      </div>
1063    </div>
1064  </div>
1065</body>
1066</html>
1067