Firefox 93 comes with lots of lovely updates including AVIF image format support, filling of XFA-based forms in its PDF viewer and protection against insecure downloads by blocking downloads relying on insecure connections.
This blog post provides merely a set of highlights; for all the details, check out the following:
AVIF Image Support
The AV1 Image File Format (AVIF) is a powerful, open source, royalty-free file format. AVIF has the potential to become the “next big thing” for sharing images in web content. It offers state-of-the-art features and performance, without the encumbrance of complicated licensing and patent royalties that have hampered comparable alternatives.
It offers much better lossless compression compared to PNG or JPEG formats, with support for higher color depths and transparency. As support is not yet comprehensive, you should include fallbacks to formats with better browser support (i.e. using the
Read more about the AVIF image format in the Image file type and format guide on MDN.
Static initialization blocks
You can have multiple static blocks within a class and they come with their own scope. As they are declared within a class, they have access to a class’s private fields. You can find more information about static initialization blocks on MDN.
Custom Elements & Shadow DOM
In Firefox 92 the Imperative Slotting API was implemented giving developers more control over assigning slots within a custom element. Firefox 93 included support for the
slotchange event that fires when the nodes within a slot change.
Also implemented in Firefox 93 is the
HTMLElement.attachInternals() method. This returns an instance of
ElementInternals, allowing control over an HTML element’s internal features. The
ElementInternals.shadowRoot property was also added, meaning developers can gain access to the shadow root of elements, even if they themselves didn’t create the element.
If you want to learn more about Custom Elements and the Shadow DOM, check out MDN’s guides on the topics.
A few other features worth noting include:
- The ARIA meter role has been implemented.
- The UI for
<input type="datetime-local">has been added.
- In CSS, the
small-capskeyword is is now supported for the
optionsobject parameter for the
createImageBitmap()method now supports
About Ruth John
Ruth John works as a Technical Writer at Mozilla. A recent addition to the MDN team, she's a big fan of web technologies, and not only enjoys writing about them, but building demos with them as well.