From 92de80274f5f235ba5ca102078034a005ca2fd82 Mon Sep 17 00:00:00 2001 From: Ondrej Zara Date: Tue, 31 Mar 2020 20:17:17 +0200 Subject: [PATCH 1/3] summary of web apis with links to mdn --- cli/js/web/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/cli/js/web/README.md b/cli/js/web/README.md index 865f4e0fb7744a..72d000cb6b4c0f 100644 --- a/cli/js/web/README.md +++ b/cli/js/web/README.md @@ -6,3 +6,26 @@ Please note, that some of implementations might not be completely aligned with specification. Some of the Web APIs are using ops under the hood, eg. `console`, `performance`. + +## Implemented Web APIs + + - [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) + - [Console](https://developer.mozilla.org/en-US/docs/Web/API/Console) + - [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) + - [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) + and [EventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventListener) + - [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) + and [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) + - [fetch](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch), + [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request), + [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), + [Body](https://developer.mozilla.org/en-US/docs/Web/API/Body) + and [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) + - [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) + - [Location](https://developer.mozilla.org/en-US/docs/Web/API/Location) + - [Performance](https://developer.mozilla.org/en-US/docs/Web/API/Performance) + - [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout), + [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval), + [clearTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout) + and [clearInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval) + - [Worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker) From e6a8b9fc306fed6f9fc1d547bb5b3af3982a6823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=BD=C3=A1ra?= Date: Thu, 2 Apr 2020 13:24:21 +0200 Subject: [PATCH 2/3] some implementation notes for web apis --- cli/js/web/README.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/cli/js/web/README.md b/cli/js/web/README.md index 72d000cb6b4c0f..12fe83dc49f33e 100644 --- a/cli/js/web/README.md +++ b/cli/js/web/README.md @@ -9,23 +9,26 @@ Some of the Web APIs are using ops under the hood, eg. `console`, `performance`. ## Implemented Web APIs - - [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - - [Console](https://developer.mozilla.org/en-US/docs/Web/API/Console) - - [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) - - [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) - and [EventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventListener) + - [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob): for representing opaque binary data + - [Console](https://developer.mozilla.org/en-US/docs/Web/API/Console): for logging purposes + - [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent), + [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) + and [EventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventListener): to work with DOM events + - **Implementation notes:** There is no DOM hierarchy in Deno, so there is no tree for Events to bubble/capture through. - [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) - and [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) + and [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams): to construct and parse URLSs - [fetch](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch), [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request), [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), [Body](https://developer.mozilla.org/en-US/docs/Web/API/Body) - and [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers) - - [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) - - [Location](https://developer.mozilla.org/en-US/docs/Web/API/Location) - - [Performance](https://developer.mozilla.org/en-US/docs/Web/API/Performance) + and [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers): modern Promise-based HTTP Request API + - [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData): access to a `multipart/form-data` serialization + - [Location](https://developer.mozilla.org/en-US/docs/Web/API/Location): parsing the current script's URL + - **Implementation notes:** the `globalThis.location` object cannot be manipulated using `assign()`, `reload()` and `replace()` methods. They are not implemented. + - [Performance](https://developer.mozilla.org/en-US/docs/Web/API/Performance): retrieving current time with a high precision - [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout), [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval), - [clearTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout) + [clearTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout): scheduling callbacks in future and [clearInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval) - - [Worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker) + - [Worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker): executing additional code in a separate thread + - **Implementation notes:** Blob URLs are not supported, object ownership cannot be transferred, posted data is serialized to JSON instead of [structured cloning](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). From 0ab1feeae65a97325769d465b214c89d44e2fee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C5=BD=C3=A1ra?= Date: Thu, 2 Apr 2020 13:38:29 +0200 Subject: [PATCH 3/3] markdown is to be pretty-formatted as well, who would have thought ;) --- cli/js/web/README.md | 62 ++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 23 deletions(-) diff --git a/cli/js/web/README.md b/cli/js/web/README.md index 12fe83dc49f33e..7df78151e4d396 100644 --- a/cli/js/web/README.md +++ b/cli/js/web/README.md @@ -9,26 +9,42 @@ Some of the Web APIs are using ops under the hood, eg. `console`, `performance`. ## Implemented Web APIs - - [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob): for representing opaque binary data - - [Console](https://developer.mozilla.org/en-US/docs/Web/API/Console): for logging purposes - - [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent), - [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) - and [EventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventListener): to work with DOM events - - **Implementation notes:** There is no DOM hierarchy in Deno, so there is no tree for Events to bubble/capture through. - - [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) - and [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams): to construct and parse URLSs - - [fetch](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch), - [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request), - [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), - [Body](https://developer.mozilla.org/en-US/docs/Web/API/Body) - and [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers): modern Promise-based HTTP Request API - - [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData): access to a `multipart/form-data` serialization - - [Location](https://developer.mozilla.org/en-US/docs/Web/API/Location): parsing the current script's URL - - **Implementation notes:** the `globalThis.location` object cannot be manipulated using `assign()`, `reload()` and `replace()` methods. They are not implemented. - - [Performance](https://developer.mozilla.org/en-US/docs/Web/API/Performance): retrieving current time with a high precision - - [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout), - [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval), - [clearTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout): scheduling callbacks in future - and [clearInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval) - - [Worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker): executing additional code in a separate thread - - **Implementation notes:** Blob URLs are not supported, object ownership cannot be transferred, posted data is serialized to JSON instead of [structured cloning](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). +- [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob): for + representing opaque binary data +- [Console](https://developer.mozilla.org/en-US/docs/Web/API/Console): for + logging purposes +- [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent), + [EventTarget](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget) + and + [EventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventListener): + to work with DOM events + - **Implementation notes:** There is no DOM hierarchy in Deno, so there is no + tree for Events to bubble/capture through. +- [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) and + [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams): + to construct and parse URLSs +- [fetch](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch), + [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request), + [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response), + [Body](https://developer.mozilla.org/en-US/docs/Web/API/Body) and + [Headers](https://developer.mozilla.org/en-US/docs/Web/API/Headers): modern + Promise-based HTTP Request API +- [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData): access + to a `multipart/form-data` serialization +- [Location](https://developer.mozilla.org/en-US/docs/Web/API/Location): parsing + the current script's URL + - **Implementation notes:** the `globalThis.location` object cannot be + manipulated using `assign()`, `reload()` and `replace()` methods. They are + not implemented. +- [Performance](https://developer.mozilla.org/en-US/docs/Web/API/Performance): + retrieving current time with a high precision +- [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout), + [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval), + [clearTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearTimeout): + scheduling callbacks in future and + [clearInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval) +- [Worker](https://developer.mozilla.org/en-US/docs/Web/API/Worker): executing + additional code in a separate thread + - **Implementation notes:** Blob URLs are not supported, object ownership + cannot be transferred, posted data is serialized to JSON instead of + [structured cloning](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).