Updating the status for supporting the defer attribute in the SVG element.

We recognize the importance of shipping both async and defer attributes 
together, and we are planning accordingly. Supporting the defer attribute 
requires additional work on integrating it within XMLParser, which will demand 
more time and effort. Therefore, this Intent to Ship (I2S) will be paused while 
we address this dependency.

We will provide updates on the I2S once we have made progress on supporting the 
defer attribute or if we encounter further challenges in its implementation. At 
this moment, the timeline for completion remains uncertain.

Please let me know if you have any questions or concerns regarding the same.

Thanks,
Virali

________________________________
From: Daniel Bratell <[email protected]>
Sent: Wednesday, May 21, 2025 21:06
To: Virali Purbey <[email protected]>; Alex Russell 
<[email protected]>; blink-dev <[email protected]>
Cc: Chromestatus <[email protected]>; Philip Jägenstedt 
<[email protected]>; Yoav Weiss <[email protected]>
Subject: Re: [EXTERNAL] Re: [blink-dev] Re: Intent to Ship: Support async 
attribute for SVG <script> element


As I see it, we should try to ship async and defer at the same time unless 
there is a strong reason to not do so, just to avoid developer confusion, and 
support matrix complexity.


/Daniel


On 2025-05-20 05:52, Virali Purbey wrote:
I am working on it to see if it is not blocked on another bug Module scripts 
should be supported in XHTML documents [40518469] - 
Chromium<https://issues.chromium.org/issues/40518469>. But thanks for bringing 
this up. As Alex suggested, if there is a need to add defer, we will be ready 
for this.

Regarding updating the spec, there is one github action item that is expected 
to update the spec Should support async and defer attributes on script elements 
· Issue #918 · w3c/svgwg<https://github.com/w3c/svgwg/issues/918>. If no one is 
working on it, I might take this up.

Thanks,
Virali
​
[https://outlook.office.com/mail/id/AAkALgAAAAAAHYQDEapmEc2byACqAC%2FEWg0AsG4vtdrUGkywNrsXcifPFQAA6gfu5gAA?nativeVersion=1.2025.617.100]<https://github.com/w3c/svgwg/issues/918>
Should support async and defer attributes on script 
elements<https://github.com/w3c/svgwg/issues/918>
You signed in with another tab or window. Reload to refresh your session. You 
signed out in another tab or window. Reload to refresh your session. You 
switched accounts on another tab or window.
github.com
​

________________________________
From: Alex Russell <[email protected]><mailto:[email protected]>
Sent: Monday, May 19, 2025 23:40
To: blink-dev <[email protected]><mailto:[email protected]>
Cc: Daniel Bratell <[email protected]><mailto:[email protected]>; blink-dev 
<[email protected]><mailto:[email protected]>; Chromestatus 
<[email protected]><mailto:[email protected]>; 
Virali Purbey <[email protected]><mailto:[email protected]>; 
Philip Jägenstedt <[email protected]><mailto:[email protected]>; Yoav Weiss 
<[email protected]><mailto:[email protected]>
Subject: [EXTERNAL] Re: [blink-dev] Re: Intent to Ship: Support async attribute 
for SVG <script> element


You don't often get email from 
[email protected]<mailto:[email protected]>. Learn why this is 
important<https://aka.ms/LearnAboutSenderIdentification>

Good question, Daniel. I'd also like to understand if we've got signals from 
developers on this. I can see a strong case for it, but we should be led by 
developer needs. The 3 users in the crbug are a good start, but have we tried 
to survey a larger population?

Best,

Alex

On Wednesday, May 14, 2025 at 8:27:02 AM UTC-7 Daniel Bratell wrote:

What is the status of the defer attribute? It is mentioned in the same SVG spec 
annotation and async and defer are similar in many ways so it would make sense 
to support both or none.

/Daniel

On 2025-05-14 17:19, Philip Jägenstedt wrote:
On Wed, May 14, 2025 at 4:45 PM Yoav Weiss (@Shopify) 
<[email protected]<mailto:[email protected]>> wrote:


On Wednesday, May 14, 2025 at 10:19:43 AM UTC+2 Chromestatus wrote:
Contact emails [email protected]<mailto:[email protected]>

Explainer None

Specification 
https://svgwg.org/svg2-draft/interact.html#ScriptElement:~:text=%E2%80%98script%E2%80%99%20element-,SVG%202%20Requirement%3A,Consider%20allowing%20async/defer%20on%20%E2%80%98script%E2%80%99.,-Resolution%3A


I don't see this in the spec, other than the annotation saying that we should 
add it at some point. I understand that we're shipping last here, but it's 
still out of process to ship without an actual specification that allows us to 
know what we're shipping is interoperable..
Design docs
https://docs.google.com/document/d/146iVXAKrBpzGYBc88EqxVLRDZyBT13ERVTs5POXcTYA/edit?usp=sharing

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.


Blink component 
Blink>SVG<https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3ESVG%22>

TAG review None

TAG review status Not applicable

Risks


Interoperability and Compatibility

This is already supported in Firefox


Gecko: Shipped/Shipping 
(https://developer.mozilla.org/en-US/docs/Web/API/SVGScriptElement)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/490)

Web developers: Positive Three users have noted they are impacted by the CrBug.

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it 
has potentially high risk for Android WebView-based applications?

None


Debuggability

The functionality of the async attribute is similar to how they are used in 
HTML <script> element, so no further devtools support is required.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, 
ChromeOS, Android, and Android WebView)? Yes

Is this feature fully tested by 
web-platform-tests<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>?
 Yes

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

This test currently passes in Chromium (and fails in Safari). It that the right 
test?

It seems like this is because the default view is experimental. The test fails 
on Chrome stable as expected:
https://wpt.fyi/results/svg/interact/scripted/async-01.svg?label=master&label=stable&aligned
--
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYcBYPqkWsoJ%3DtYbqwBZ5Rt-iKLREe7jBEqOVP%3D7iUWO_w%40mail.gmail.com<https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYcBYPqkWsoJ%3DtYbqwBZ5Rt-iKLREe7jBEqOVP%3D7iUWO_w%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/SI2P153MB0507EB35B0F616D35FD084A4C148A%40SI2P153MB0507.APCP153.PROD.OUTLOOK.COM.

Reply via email to