diff --git a/docs/global-AbortController.md b/docs/global-AbortController.md new file mode 100644 index 00000000000..0796fbacfde --- /dev/null +++ b/docs/global-AbortController.md @@ -0,0 +1,8 @@ +--- +id: global-AbortController +title: AbortController +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information. + +The global `AbortController` class, as defined in Web specifications. diff --git a/docs/global-AbortSignal.md b/docs/global-AbortSignal.md new file mode 100644 index 00000000000..ef1b69898c3 --- /dev/null +++ b/docs/global-AbortSignal.md @@ -0,0 +1,8 @@ +--- +id: global-AbortSignal +title: AbortSignal +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) for more information. + +The global `AbortSignal` class, as defined in Web specifications. diff --git a/docs/global-Blob.md b/docs/global-Blob.md new file mode 100644 index 00000000000..f163c76e3b0 --- /dev/null +++ b/docs/global-Blob.md @@ -0,0 +1,8 @@ +--- +id: global-Blob +title: Blob +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob) for more information. + +The global `Blob` class, as defined in Web specifications. diff --git a/docs/global-File.md b/docs/global-File.md new file mode 100644 index 00000000000..efad3a26835 --- /dev/null +++ b/docs/global-File.md @@ -0,0 +1,8 @@ +--- +id: global-File +title: File +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/File) for more information. + +The global `File` class, as defined in Web specifications. diff --git a/docs/global-FileReader.md b/docs/global-FileReader.md new file mode 100644 index 00000000000..eb62dd9741d --- /dev/null +++ b/docs/global-FileReader.md @@ -0,0 +1,8 @@ +--- +id: global-FileReader +title: FileReader +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/FileReader) for more information. + +The global `FileReader` class, as defined in Web specifications. diff --git a/docs/global-FormData.md b/docs/global-FormData.md new file mode 100644 index 00000000000..ff51621401b --- /dev/null +++ b/docs/global-FormData.md @@ -0,0 +1,8 @@ +--- +id: global-FormData +title: FormData +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData) for more information. + +The global `FormData` class, as defined in Web specifications. diff --git a/docs/global-Headers.md b/docs/global-Headers.md new file mode 100644 index 00000000000..94e3aa2f3f7 --- /dev/null +++ b/docs/global-Headers.md @@ -0,0 +1,8 @@ +--- +id: global-Headers +title: Headers +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Headers) for more information. + +The global `Headers` class, as defined in Web specifications. diff --git a/docs/global-Request.md b/docs/global-Request.md new file mode 100644 index 00000000000..a0b62cedebd --- /dev/null +++ b/docs/global-Request.md @@ -0,0 +1,8 @@ +--- +id: global-Request +title: Request +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Request) for more information. + +The global `Request` class, as defined in Web specifications. diff --git a/docs/global-Response.md b/docs/global-Response.md new file mode 100644 index 00000000000..2fa62100a44 --- /dev/null +++ b/docs/global-Response.md @@ -0,0 +1,8 @@ +--- +id: global-Response +title: Response +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Response) for more information. + +The global `Response` class, as defined in Web specifications. diff --git a/docs/global-URL.md b/docs/global-URL.md new file mode 100644 index 00000000000..0ecfc1cb6ba --- /dev/null +++ b/docs/global-URL.md @@ -0,0 +1,8 @@ +--- +id: global-URL +title: URL +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/URL) for more information. + +The global `URL` class, as defined in Web specifications. diff --git a/docs/global-URLSearchParams.md b/docs/global-URLSearchParams.md new file mode 100644 index 00000000000..08a980dbd27 --- /dev/null +++ b/docs/global-URLSearchParams.md @@ -0,0 +1,8 @@ +--- +id: global-URLSearchParams +title: URLSearchParams +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) for more information. + +The global `URLSearchParams` class, as defined in Web specifications. diff --git a/docs/global-WebSocket.md b/docs/global-WebSocket.md new file mode 100644 index 00000000000..bb78f454fa6 --- /dev/null +++ b/docs/global-WebSocket.md @@ -0,0 +1,8 @@ +--- +id: global-WebSocket +title: WebSocket +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) for more information. + +The global `WebSocket` class, as defined in Web specifications. diff --git a/docs/global-XMLHttpRequest.md b/docs/global-XMLHttpRequest.md new file mode 100644 index 00000000000..0da4b594109 --- /dev/null +++ b/docs/global-XMLHttpRequest.md @@ -0,0 +1,8 @@ +--- +id: global-XMLHttpRequest +title: XMLHttpRequest +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) for more information. + +The global `XMLHttpRequest` class, as defined in Web specifications. diff --git a/docs/global-__DEV__.md b/docs/global-__DEV__.md new file mode 100644 index 00000000000..ca3cc3104ba --- /dev/null +++ b/docs/global-__DEV__.md @@ -0,0 +1,8 @@ +--- +id: global-__DEV__ +title: ✨ __DEV__ +--- + +You can use the `__DEV__` pseudo-global variable in the codebase to guard development-only blocks of code. + +It is inlined during compilation and gets completely stripped out with the `if` blocks it guards in the minified build. diff --git a/docs/global-alert.md b/docs/global-alert.md new file mode 100644 index 00000000000..a8f2d7d73d7 --- /dev/null +++ b/docs/global-alert.md @@ -0,0 +1,8 @@ +--- +id: global-alert +title: alert +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/alert) for more information. + +The global `alert` function, as defined in Web specifications. diff --git a/docs/global-cancelAnimationFrame.md b/docs/global-cancelAnimationFrame.md new file mode 100644 index 00000000000..c8931e03faf --- /dev/null +++ b/docs/global-cancelAnimationFrame.md @@ -0,0 +1,8 @@ +--- +id: global-cancelAnimationFrame +title: cancelAnimationFrame +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame) for more information. + +The global `cancelAnimationFrame` function, as defined in Web specifications. diff --git a/docs/global-cancelIdleCallback.md b/docs/global-cancelIdleCallback.md new file mode 100644 index 00000000000..bd33c121fcd --- /dev/null +++ b/docs/global-cancelIdleCallback.md @@ -0,0 +1,8 @@ +--- +id: global-cancelIdleCallback +title: cancelIdleCallback +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelIdleCallback) for more information. + +The global `cancelIdleCallback` function, as defined in Web specifications. diff --git a/docs/global-clearInterval.md b/docs/global-clearInterval.md new file mode 100644 index 00000000000..dc73708423e --- /dev/null +++ b/docs/global-clearInterval.md @@ -0,0 +1,8 @@ +--- +id: global-clearInterval +title: clearInterval +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/clearInterval) for more information. + +The global `clearInterval` function, as defined in Web specifications. diff --git a/docs/global-clearTimeout.md b/docs/global-clearTimeout.md new file mode 100644 index 00000000000..84e25401e39 --- /dev/null +++ b/docs/global-clearTimeout.md @@ -0,0 +1,8 @@ +--- +id: global-clearTimeout +title: clearTimeout +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/clearTimeout) for more information. + +The global `clearTimeout` function, as defined in Web specifications. diff --git a/docs/global-console.md b/docs/global-console.md new file mode 100644 index 00000000000..184ee36ecb6 --- /dev/null +++ b/docs/global-console.md @@ -0,0 +1,8 @@ +--- +id: global-console +title: console +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/console) for more information. + +The global `console` object, as defined in Web specifications. diff --git a/docs/global-fetch.md b/docs/global-fetch.md new file mode 100644 index 00000000000..ec07df28173 --- /dev/null +++ b/docs/global-fetch.md @@ -0,0 +1,8 @@ +--- +id: global-fetch +title: fetch +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch) for more information. + +The global `fetch` function, as defined in Web specifications. diff --git a/docs/global-global.md b/docs/global-global.md new file mode 100644 index 00000000000..49988b52bad --- /dev/null +++ b/docs/global-global.md @@ -0,0 +1,8 @@ +--- +id: global-global +title: global +--- + +[`global`](https://nodejs.org/api/globals.html#global) is a legacy alias for [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis), as defined in Node.js. + +The use of `globalThis` is recommended over `global`. diff --git a/docs/global-navigator.md b/docs/global-navigator.md new file mode 100644 index 00000000000..77c0454661c --- /dev/null +++ b/docs/global-navigator.md @@ -0,0 +1,8 @@ +--- +id: global-navigator +title: navigator +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/navigator) for more information. + +The global `navigator` object, as defined in Web specifications. diff --git a/docs/global-performance.md b/docs/global-performance.md new file mode 100644 index 00000000000..d8c16b6b82d --- /dev/null +++ b/docs/global-performance.md @@ -0,0 +1,8 @@ +--- +id: global-performance +title: performance +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/performance) for more information. + +The global `performance` object, as defined in Web specifications. diff --git a/docs/global-process.md b/docs/global-process.md new file mode 100644 index 00000000000..756b7967fba --- /dev/null +++ b/docs/global-process.md @@ -0,0 +1,8 @@ +--- +id: global-process +title: process +--- + +> 🚧 This page is work in progress. + +The global `process` object, as defined in Node.js. diff --git a/docs/global-queueMicrotask.md b/docs/global-queueMicrotask.md new file mode 100644 index 00000000000..817f6c36894 --- /dev/null +++ b/docs/global-queueMicrotask.md @@ -0,0 +1,8 @@ +--- +id: global-queueMicrotask +title: queueMicrotask +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/queueMicrotask) for more information. + +The global `queueMicrotask` function, as defined in Web specifications. diff --git a/docs/global-requestAnimationFrame.md b/docs/global-requestAnimationFrame.md new file mode 100644 index 00000000000..b04d67dc503 --- /dev/null +++ b/docs/global-requestAnimationFrame.md @@ -0,0 +1,8 @@ +--- +id: global-requestAnimationFrame +title: requestAnimationFrame +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame) for more information. + +The global `requestAnimationFrame` function, as defined in Web specifications. diff --git a/docs/global-requestIdleCallback.md b/docs/global-requestIdleCallback.md new file mode 100644 index 00000000000..bec6eb43ba3 --- /dev/null +++ b/docs/global-requestIdleCallback.md @@ -0,0 +1,8 @@ +--- +id: global-requestIdleCallback +title: requestIdleCallback +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback) for more information. + +The global `requestIdleCallback` function, as defined in Web specifications. diff --git a/docs/global-self.md b/docs/global-self.md new file mode 100644 index 00000000000..9e8aab5cf21 --- /dev/null +++ b/docs/global-self.md @@ -0,0 +1,8 @@ +--- +id: global-self +title: self +--- + +[`self`](https://developer.mozilla.org/en-US/docs/Web/API/Window/self) is an alias for [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis), as defined in Web specifications. + +The use of `globalThis` is recommended over `self`. diff --git a/docs/global-setInterval.md b/docs/global-setInterval.md new file mode 100644 index 00000000000..83963c78624 --- /dev/null +++ b/docs/global-setInterval.md @@ -0,0 +1,8 @@ +--- +id: global-setInterval +title: setInterval +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval) for more information. + +The global `setInterval` function, as defined in Web specifications. diff --git a/docs/global-setTimeout.md b/docs/global-setTimeout.md new file mode 100644 index 00000000000..13ecdfd931d --- /dev/null +++ b/docs/global-setTimeout.md @@ -0,0 +1,8 @@ +--- +id: global-setTimeout +title: setTimeout +--- + +> 🚧 This page is work in progress, so please refer to the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout) for more information. + +The global `setTimeout` function, as defined in Web specifications. diff --git a/docs/global-window.md b/docs/global-window.md new file mode 100644 index 00000000000..ea0355a688b --- /dev/null +++ b/docs/global-window.md @@ -0,0 +1,8 @@ +--- +id: global-window +title: window +--- + +[`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) is an alias for [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis), as defined in Web specifications. + +The use of `globalThis` is recommended over `window`. diff --git a/website/sidebars.ts b/website/sidebars.ts index c70d5d2d1c9..42c4c457ab7 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -221,6 +221,44 @@ export default { 'systrace', 'transforms', 'vibration', + { + type: 'category', + label: 'Globals', + collapsed: true, + items: [ + 'global-__DEV__', + 'global-AbortController', + 'global-AbortSignal', + 'global-alert', + 'global-Blob', + 'global-cancelAnimationFrame', + 'global-cancelIdleCallback', + 'global-clearInterval', + 'global-clearTimeout', + 'global-console', + 'global-fetch', + 'global-File', + 'global-FileReader', + 'global-FormData', + 'global-global', + 'global-Headers', + 'global-navigator', + 'global-performance', + 'global-process', + 'global-queueMicrotask', + 'global-Request', + 'global-requestAnimationFrame', + 'global-requestIdleCallback', + 'global-Response', + 'global-setInterval', + 'global-setTimeout', + 'global-URL', + 'global-URLSearchParams', + 'global-WebSocket', + 'global-window', + 'global-XMLHttpRequest', + ], + }, { type: 'category', label: 'Hooks',