another chapter we’ll cover AbortController that can help with that, but it’s not a part of the Promise API
Also, there’s an additional asynchronous API of accessing the clipboard: navigator.clipboard.… More about it in the specification Clipboard API and events, not supported by Firefox.… On the other hand, navigator.clipboard is the more recent API, meant for use in any context.
Modern browsers also support Broadcast channel API, the special API for same-origin inter-window communication… There are libraries that polyfill that API, based on localStorage, that make it available everywhere.… iframes from the same origin
Survives browser restart
Survives page refresh (but not tab close)
API
Readable streams are described in the Streams API specification.… Please note:
Streams API also describes asynchronous iteration over ReadableStream with for
For instance, a request with PUT method or with an API-Key HTTP-header does not fit the limitations.… such an Access-Control-Expose-Headers header, the script is allowed to read the Content-Encoding and API-Key… “Unsafe” API-Key header.… https://javascript.info
Access-Control-Allow-Methods: PATCH
Access-Control-Allow-Headers: Content-Type,API-Key… Now the browser can see that PATCH is in Access-Control-Allow-Methods and Content-Type,API-Key
At least, the Selection API specification says so.… Selection in form controls.Form elements, such as input and textarea provide special API for selection… DOM spec: Range
Selection API
HTML spec: APIs for the text control selections
Summary.We covered two… different APIs for selections:
For document: Selection and Range objects.… The second API is very simple, as it works with text.
In the browser, there are additional higher-level objects, described in File API, in particular Blob.… here, but here’s an example, and you can read more at https://developer.mozilla.org/en-US/docs/Web/API
API: events, class methods etc, to interact with other components.
And if we’re going to send a File over a network, that’s also easy: network API like XMLHttpRequest or
Chat example.Let’s review a chat example using browser WebSocket API and Node.js WebSocket module https… The API is simple.
Methods:
socket.send(data),
socket.close([code], [reason]).
It’s also noteworthy that in some environments, like in browsers, there’s also another API called Streams
You can find more information in the chapter Fetch API.
The Reflect API is designed to complement Proxy.