In my opinion, the most interesting and expected innovation is related to the support of the modular syntax of the latest ECMA Script standard. Usage will be as follows: ')
In order to ensure that each imported script is loaded no more than once per document or web worker, a module map has been implemented, which will contain reference records with one of the following values:
- directly modular script (module script); - null used to indicate failed downloads; - fetching - temporary placeholder.
The path to the file will first be passed through the Parser link (URL parser) , the correct values will be used to resolve the path. Duplicate paths will be ignored.
It should be noted that if the path does not begin with the characters "/", "./" or "../", an error will be returned. This is due to the planned introduction of “bare” imports in the future.
Separately, it should be noted that the incorrect MIME type, unlike ordinary scripts, will be an error with respect to a modular script.
<Dialog> element
The <dialog> tag defines a window or container for creating pop-up and modal windows. In addition to the standard html attributes, this tag will have one open attribute from the bullet indicating whether the element is active and available to the user for interaction. As a JavaScript object, <dialog>, besides the standard properties and methods, got the properties:
- open - getter / setter - whether the element is active; - returnValue - getter / setter - the value returned by the element, as well as methods: - close () - closes the element; -open () - shows the element; -showModal () displays the element and makes it modal to the top-level elements.
Nonce attribute for <link>
The <link> element received a nonce attribute, which is a cryptographic nonce (“specifically for this case”), which can be used to determine whether an external resource specified in <link> will be loaded and applied to the document.
<Iframe> element
The <iframe> element received two changes at once, a new attribute allowpaymentrequest for integration with the Payment Request API and a new value for the attribute sandbox for integration with the Presentation API.
Removed from standard
elements <keygen>, <menu> and <menuitem>;
inputmode attribute for text <input>, and dropzone attributes;
showModalDialog method .
Valid from the point of view of the standard was
using the <style> tag inside the <body>;
- multiple <main> elements in the DOM, provided that only one is visible to the user;