← Back to release summary

Support async attribute for SVG <script> element

Category
Miscellaneous
Type
Chromium catches up
Status
On hold (Chrome On hold)
Intent stage
None

WPT details: wpt.fyi link: https://wpt.fyi/results/svg/interact/scripted/async-01.svg

Summary

The SVGScriptElement interface in SVG 2.0 introduces the async attribute, similar to the HTMLScriptElement. This attribute allows scripts to be executed asynchronously, improving the performance and responsiveness of web applications that utilize SVG.

Motivation

SVG 2.0 specifies the async attribute for SVGScriptElement, aligning it with the HTMLScriptElement. This alignment is crucial for several reasons: Performance Improvement: Asynchronous script execution enhances web page performance by allowing scripts to load and execute without blocking rendering. This is beneficial for complex SVG graphics relying on external scripts. Consistency Across Web Technologies: Supporting the async attribute in SVGScriptElement ensures consistency between HTML and SVG, simplifying development and reducing errors. Enhanced User Experience: Asynchronous script execution makes web pages more responsive and interactive, improving user experience by reducing delays and interruptions. Interoperability: Firefox already support the async attribute for SVGScriptElement. Adding this feature to Chromium enhances interoperability across browsers, providing a consistent experience for web authors and users. Overall, lacking support for the async attribute in Chromium's SVG 2.0 can cause performance issues, inconsistent user experiences, and increased development complexity. Adding this feature will resolve these problems and align Chromium with other major browsers, creating a more unified web environment.

Standards & signals

Ecosystem

Docs: https://docs.google.com/document/d/146iVXAKrBpzGYBc88EqxVLRDZyBT13ERVTs5POXcTYA/edit?usp=sharing

View on chromestatus.com