The HTML specification 5.2 update was released by the W3C on 14 December 2017 and is officially recommended for use. The update adds new features such as dialog tags, scrapes existing features such as the HTML plug-in system, and incorporates other W3C committee advances such as support for the Payment Request API and Presentation API.
The new version of the specification adds some important attributes to the iframe tag to support the new JavaScript API. The AllowPaymentRequest attribute has been added to allow iframe to control access to the paymentrequest API. This also means that a page with embedded third-party content can control whether that third-party content can request payment credentials from the user, allowing embeddable shopping cart tools to take advantage of the new API. Brendan Miller from Forrester illustrates the benefits of the payment request API, saying:
The Payment request API is already available in Chrome, Edge, and Safari in the Tech Preview.
The HTML5.2 specification also added the AllowPresentation property, which allows iframe to access the presentation API to embed a page into a third party presentation that can access a projector, monitor, or internet-connected TV, for example. The demo API is only a W3C candidate recommendation and is currently only available on Chrome.
There is also increasing emphasis on security in new specifications. It incorporates several recommendations from draft Content Security Policy level 3. The Link tag formally supports the Nonce attribute, and content security policies prevent inline behavior of style and script tags in advance. These tools give developers more flexibility over the resources their Web applications are allowed to load, reducing the potential damage from cross-site scripting attacks. Developers can use guidelines and documentation on MDM to learn how to use content security policies to protect their applications.
This version of the HTML specification also provides official support for ES6 JavaScript modules. Most browsers already implement this feature. It’s available in Safari 10.1, Chrome 61, and Edge 16, while Firefox requires certain features to be turned on.
HTML5.2 is the second major revision of the HTML5 specification, following a 2014 W3C commitment to publish revisions to the specification roughly annually. This revision also includes extensive cleanups and bug fixes, major security updates, progressive integration of other committees, and other updates to keep the specification up to date with widespread use of the web. Developers can consult the change log in the specification release for detailed changes.
Interested developers can see all the changes in the official HTML5.2 recommendations. At the same time, the committee has begun work on HTML5.3 and released a working draft with HTML5.2.
W3C Releases HTML 5.2 As Official Recommendation