diff options
author | Geert-Jan Zwiers <34610306+GJZwiers@users.noreply.github.com> | 2022-02-22 20:41:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 20:41:59 +0100 |
commit | 6613a312b160374ba7a86c3b88fb67c0fe4247e0 (patch) | |
tree | 6ee0ccf2a24f705fc37543e80d06400704fe8627 /cli/dts/lib.deno.window.d.ts | |
parent | 877c0b724e57211c63505d932ebf6f1051a9c2f1 (diff) |
docs: code example to `structuredClone`, `CompressionStream`, `DecompressionStream` (#13719)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/dts/lib.deno.window.d.ts')
-rw-r--r-- | cli/dts/lib.deno.window.d.ts | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/cli/dts/lib.deno.window.d.ts b/cli/dts/lib.deno.window.d.ts index 1c8cdeae8..fbd0a967b 100644 --- a/cli/dts/lib.deno.window.d.ts +++ b/cli/dts/lib.deno.window.d.ts @@ -71,9 +71,11 @@ declare function prompt(message?: string, defaultValue?: string): string | null; /** Registers an event listener in the global scope, which will be called * synchronously whenever the event `type` is dispatched. * - * addEventListener('unload', () => { console.log('All finished!'); }); - * ... - * dispatchEvent(new Event('unload')); + * ```ts + * addEventListener('unload', () => { console.log('All finished!'); }); + * ... + * dispatchEvent(new Event('unload')); + * ``` */ declare function addEventListener( type: string, @@ -83,9 +85,11 @@ declare function addEventListener( /** Remove a previously registered event listener from the global scope * - * const lstnr = () => { console.log('hello'); }; - * addEventListener('load', lstnr); - * removeEventListener('load', lstnr); + * ```ts + * const listener = () => { console.log('hello'); }; + * addEventListener('load', listener); + * removeEventListener('load', listener); + * ``` */ declare function removeEventListener( type: string, |