[svgwg] SVGAnimatedString erroneously invokes Trusted Types for SVGScriptElement.className.baseVal (#963)

lukewarlow has just created a new issue for https://github.com/w3c/svgwg:

== SVGAnimatedString erroneously invokes Trusted Types for SVGScriptElement.className.baseVal ==
`SVGScriptElement` can have `SVGAnimatedString` properties other than `href` and actually I believe `className` is the only one.

As I read the current text, `Get Trusted Type compliant string` will be executed with the 'SVGScriptElement href' when one tries to set `SVGScriptElement.className` to a plain string, but we probably just want to use the specified value in that case.

I added more tests in to cover this (as well as href on non-script elements) where we don't want to run the TT checks: https://phabricator.services.mozilla.com/D233341. Luckily, Gecko implements `SVGAnimatedString` for `className` in a separate C++ class so it's easy to make the test pass, but I don't know whether the checking the reflected attribute name is straightforward in other engines...

Chromium fails for "Assign string to SVGScriptElement.className.baseVal.", so it indeed executes the trusted type check for class name.

_Originally posted by @fred-wang in https://github.com/w3c/svgwg/issues/961#issuecomment-2574898101_
            

Please view or discuss this issue at https://github.com/w3c/svgwg/issues/963 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 7 January 2025 11:58:46 UTC