Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should SVGScriptElement have an IDL way to set a trusted script value? #512

Open
lukewarlow opened this issue May 2, 2024 · 2 comments
Open
Labels
Milestone

Comments

@lukewarlow
Copy link
Member

Currently I don't believe there's any sanctioned way to update the contents of an SVG script element (assuming #483 is done so the protection covers them too).

The spec says that we recommend authors use script.textContent, script.innerText or script.text for updating the contents of a script element with a trusted object. Should the same not also hold true for an SVG script element?

As far as I can see this isn't just a spec issue it's also missing from Chrome's implementation.

It would seem to make sense to shadow Node.textContent to the SVGScriptElement type?

@lukewarlow lukewarlow added the spec label May 2, 2024
@lukewarlow lukewarlow added this to the v2 milestone May 2, 2024
@lukewarlow
Copy link
Member Author

(Setting to v2 as it's not a mechanism shipped in Chromium that needs speccing, so isn't urgent)

@annevk
Copy link
Member

annevk commented May 2, 2024

We should probably define some kind of mixin the two script elements can share. But this doesn't seem like a high priority as you can just use the HTML script element in all cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants