RESOLVED FIXED331037
Add crossOrigin IDL attribute to SVGScriptElement
https://bugs.webkit.org/show_bug.cgi?id=331037
Summary Add crossOrigin IDL attribute to SVGScriptElement
Karl Dubost
Reported 2026-11-10 17:12:11 PST

SVG 2 gives SVGScriptElement a crossOrigin IDL attribute that reflects the crossorigin content attribute, with the processing rules of HTML <script>:

https://w3c.github.io/svgwg/svg2-draft/interact.html#ScriptElementCrossoriginAttribute
https://w3c.github.io/svgwg/svg2-draft/interact.html#__svg__SVGScriptElement__crossOrigin

WebKit already honours the content attribute when fetching an SVG script (ScriptElement reads crossorigin for SVG and HTML scripts alike), but SVGScriptElement has no crossOrigin property:

const s = document.createElementNS("http://www.w3.org/2000/svg", "script");
s.setAttribute("crossorigin", "use-credentials");
s.crossOrigin; // undefined, expected "use-credentials"

svg/idlharness.window.html fails on it:

FAIL SVGScriptElement interface: attribute crossOrigin
FAIL SVGScriptElement interface: objects.script must inherit property "crossOrigin" with the proper type
Attachments
Radar WebKit Bug Importer
Comment 1 2026-11-10 17:13:07 PST
Karl Dubost
Comment 2 2026-11-10 18:06:00 PST
EWS
Comment 3 2026-11-11 17:20:47 PST
Committed 326474@main (45993932a33d): <https://commits.webkit.org/326474@main> Reviewed commits have been landed. Closing PR #80422 and removing active labels.
Karl Dubost
Comment 4 2026-11-11 19:26:54 PST
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/65072
Note You need to log in before you can comment on or make changes to this bug.