Let’s revisit arrow functions.
Arrow functions are not just a “shorthand” for writing small stuff.
Between these releases, the latest specification draft is at https://tc39.es/ecma262/.… You can find it at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference.… Just use “MDN [term]” in the query, e.g. https://google.com/search?… of support, e.g. to see which engines support modern cryptography functions: https://caniuse.com/#feat… =cryptography.
https://kangax.github.io/compat-table – a table with language features and engines that
The HTML spec at https://html.spec.whatwg.org is not only about the “HTML language” (tags, attributes… Also, some parts have additional specs listed at https://spec.whatwg.org.… Additionally, some classes are described separately at https://spec.whatwg.org/.… /en-US/ is also a nice resource, but the corresponding spec may be better: it’s more complex and longer… q=whatwg+localstorage, https://google.com?q=mdn+localstorage.
They are a part of the HTTP protocol, defined by the RFC 6265 specification.… Cookies are usually set by a web server using the response Set-Cookie HTTP header.… By default, if we set a cookie at http://site.com, then it also appears at https://site.com and vice… is accessed by HTTP, as http://site.com.… The full list of safe HTTP methods is in the RFC7231 specification.
Request from HTTPS to HTTP (from safe to unsafe protocol).… →HTTP request, then send nothing.… "strict-origin" – send only the origin, not the Referer for HTTPS→HTTP requests.… "unsafe-url" – always send the full url in Referer, even for HTTPS→HTTP requests.… to HTTP, then no Referer).
Styles applied to :visited links are hidden!… Visited links may be colored using :visited CSS pseudoclass.… JavaScript may not see the styles applied by :visited.… And also, there’s a limitation in CSS that forbids applying geometry-changing styles in :visited.… That’s to guarantee that there’s no side way for an evil page to test if a link was visited and hence
For screenshotting a page, we can use a library such as https… It’s outside of our scope here, but here’s an example, and you can read more at https://developer.mozilla.org… /en-US/docs/Web/API/Streams_API.
Then it visits and “marks” all references from them.… Then it visits marked objects and marks their references.… All visited objects are remembered, so as not to visit the same object twice in the future.… …And so on until every reachable (from the roots) references are visited.… references, while possible:
Now the objects that could not be visited
For instance, we have code that keeps a visit count for users.… The information is stored in a map: a user object is the key and the visit count is the value.… When a user leaves (its object gets garbage collected), we don’t want to store their visit count anymore… For instance, we can add users to WeakSet to keep track of those who visited our site:
If anything is unclear, please visit… to retrieve commits in the same, paginated fashion:
We should make a request to fetch in the form https… The initial URL is https://api.github.com/repos/<repo>/commits, and the next page will be in the… The next page URL may look like https://api.github.com/repositories/93253246/commits?page=2.
At this stage we can check HTTP status, to see whether it is successful or not, check headers, but don… The promise rejects if the fetch was unable to make HTTP-request, e.g. network problems, or there’s no… Abnormal HTTP-statuses, such as 404 or 500 do not cause an error.… We can see HTTP-status in response properties:
status – HTTP status code, e.g. 200.
ok – boolean, true… if the HTTP status code is 200-299.
For instance, let’s try fetching http://example.com:… Then we make a <script> tag with src="http://another.com/weather.json?… For instance, if we request https://anywhere.com/request from https://javascript.info/page, the headers… That’s uncommon for HTTP-requests.… For example, fetch('http://another.com') does not send any cookies, even those (!)
It’s like HTTPS for websockets.… On the other hand, wss:// is WebSocket over TLS, (same as HTTPS is HTTP over TLS), the transport security… And that’s not HTTP at all.… WebSocket codes are somewhat like HTTP codes, but different.… ://site.com goes to the main HTTP-server.
XMLHttpRequest is a built-in browser object that allows to make HTTP requests in JavaScript.… These three events are the most widely used:
load – when the request is complete (even if HTTP status… status code (a number): 200, 404, 403 and so on, can be 0 in case of a non-HTTP failure.
statusText… HTTP-headers.XMLHttpRequest allows both to send custom headers and read headers from the response.… Just like fetch, it doesn’t send cookies and HTTP-authorization to another origin by default.
These URLs all share the same origin:
http://site.com
http://site.com/
http://site.com/my/page.html… These ones do not:
http://www.site.com (another domain: www. matters)
http://site.org (another domain… : .org matters)
https://site.com (another protocol: https)
http://site.com:8080 (another port: 8080)… special properties:
data
The data from postMessage.
origin
The origin of the sender, for instance http… triggers the message event with special properties:
origin – the origin of the sender window (like http
other aspects of JavaScript, so we’ll return to arrow functions later in the chapter Arrow functions revisited
language appear regularly, they are analyzed and, if considered worthy, are appended to the list at https… A good page to see the current state of support for language features is https://compat-table.github.io… Good resources that show the current state of support for various features:
https://compat-table.github.io… /compat-table/es6/ – for pure JavaScript.
https://caniuse.com/ – for browser-related functions.
list would require a lot of space, so here are the references:
List all properties by a character: https… List all characters by a property: https://unicode.org/cldr/utility/list-unicodeset.jsp.… Short aliases for properties: https://www.unicode.org/Public/UCD/latest/ucd/PropertyValueAliases.txt.… A full base of Unicode characters in text format, with all properties, is here: https://www.unicode.org
One-directional: only server sends data
Binary and text data
Only text
WebSocket protocol
Regular HTTP… Besides, it’s a plain old HTTP, not a new protocol.… If the server wants the browser to stop reconnecting, it should respond with HTTP status 204.… Also, there will be no reconnection if the response has an incorrect Content-Type or its HTTP… the connection is open.
error – the connection could not be established, e.g. the server returned HTTP
Built-in events mostly have composed: true, as described in the relevant specifications:
UI Events https… Touch Events https://w3c.github.io/touch-events.… Pointer Events https://www.w3.org/TR/pointerevents.
…And so on.
Please note that we can’t get HTTP… So, e.g. a script at https://facebook.com can’t read the user’s mailbox at https://gmail.com.
hash starts with the hash character #
there may be also user and password properties if HTTP authentication… is present: http://login:password@site.com (not painted above, rarely used).… …”.Let’s say we want to create a url with given search params, for instance, https://google.com/search
The native interface to IndexedDB, described in the specification https://www.w3.org/TR/IndexedDB, is… We can also use async/await with the help of a promise-based wrapper, like https://github.com/jakearchibald… So, when we have published a new version of our app, and the user visits our webpage, we may need to… Let’s use a thin promise wrapper https://github.com/jakearchibald/idb further in this chapter.… The examples are at the lib page https://github.com/jakearchibald/idb.
A page from http://anysite.com which a user has opened must not be able to access another browser tab… with the URL http://gmail.com, for example, and steal information from there.… Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side.
DOM: https://dom.spec.whatwg.org/#shadow-trees
Compatibility: https://caniuse.com/#feat=shadowdomv1
Shadow
The full specification of the <select> element is available in the specification https… Specification: https://html.spec.whatwg.org/multipage/forms.html.
HTML Living Standard: https://html.spec.whatwg.org/#custom-elements.… Compatiblity: https://caniuse.com/#feat=custom-elementsv1.… There’s a polyfill https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs.
Later in the chapter Arrow functions revisited we’ll go more deeply into arrow functions.
Summary.
You can find the current state of support at https://caniuse.com/#feat=bigint.
It must be sent exactly as HTTP-header: the browser will ignore it if found in HTML <meta> tag.… So, <meta http-equiv="X-Frame-Options"...> won’t do anything.
But repeated visits should not lead to duplicates. A visitor must be “counted” only once.
-- https://github.com/ChromeDevTools/devtools-frontend/blob/master/front_end/Images/src/largeIcons.svg… The full manual is at https://developers.google.com/web/tools/chrome-devtools.
You can read more information about JSDoc at https://jsdoc.app.
Why is the task solved this way?
On the other hand, we should keep in mind that the mouse pointer doesn’t “visit” all elements along the
In the latter case, stylesheets are HTTP-cached, so they are not redownloaded for multiple components
There are also web-services that provide error-logging for such cases, like https://muscula.com or https
loading after the page is complete)
…or after an async script (if an async script is short or was in HTTP-cache
Also unlike cookies, the server can’t manipulate storage objects via HTTP headers.
Arrow functions have no super
As was mentioned in the chapter Arrow functions revisited,
For instance, we can do it on the site https://cubic-bezier.com.… You can find a longer list of CSS properties and which stages they trigger at https://csstriggers.com
See https://eslint.org/docs/user-guide/getting-started for more details about installation.
A polyfill may be required, such as https://github.com/ljharb/String.prototype.matchAll.
The great pack of articles about V8 can be found at https://mrale.ph.
exists a special navigator.sendBeacon(url, data) method for such needs, described in the specification https
There’s an extensive documentation about Chrome Developer Tools at https://developers.google.com/web/
Modules work only via HTTP(s), not locally
If you try to open a web-page locally, via file
For instance, HTMLInputElement is documented at https://html.spec.whatwg.org/#htmlinputelement.