Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web docs #4578

Merged
merged 3 commits into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions cli/js/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,45 @@ 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): 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).