Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Change Script Enforcement Mechanism to use flags #579

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lukewarlow
Copy link
Member

@lukewarlow lukewarlow commented Feb 3, 2025

Also add SVGScriptElement to spec


Preview | Diff

@lukewarlow
Copy link
Member Author

This still requires changes to deal with the issues related to children changed steps being fired by parser.

Also add SVGScriptElement to spec
@lukewarlow lukewarlow force-pushed the script-protection-v3 branch from 05fda45 to 11456d2 Compare February 3, 2025 15:47

1. Set [=this=]'s [=SVGScriptElement/is trusted=] to false.

1. Run the {{SVGScriptElement|script}} [=post-connection steps=], given [=this=].
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does SVG even have this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SVG has very little but we can add a note that we assume it has the same as HTML script has.

@lukewarlow
Copy link
Member Author

Opened #581 to at least add SVG to the existing spec while this bit is still to be worked out.

<li>...
</ol>

Issue: There's no proper definition for the processing of SVG script elements. However, you should apply a similar change to the processing of {{SVGScriptElement}}s.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we mention the sink name explicitly? WebKit uses "SVGScriptElement text": https://searchfox.org/wubkat/rev/d1661224f525bf15e34fde4eafe9de09b92c864b/Source/WebCore/dom/ScriptElement.cpp#192

lando-prod-mozilla bot pushed a commit to mozilla-firefox/firefox that referenced this pull request May 31, 2025
… text transformed by the default policy. r=smaug

This verifies that the source text transformed by the default policy is used
for various steps of "prepare the script element":

https://html.spec.whatwg.org/#prepare-the-script-element
PR w3c/trusted-types#579

Differential Revision: https://phabricator.services.mozilla.com/D251456
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request May 31, 2025
…ormed by the default policy.

This verifies that the source text transformed by the default policy is used
for various steps of "prepare the script element":

https://html.spec.whatwg.org/#prepare-the-script-element
PR w3c/trusted-types#579

Differential Revision: https://phabricator.services.mozilla.com/D251456

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1968383
gecko-commit: b40ba3e6cd668c9890ed7e4c6bdfdf2ee60cbcc4
gecko-reviewers: smaug
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request May 31, 2025
… text transformed by the default policy. r=smaug

This verifies that the source text transformed by the default policy is used
for various steps of "prepare the script element":

https://html.spec.whatwg.org/#prepare-the-script-element
PR w3c/trusted-types#579

Differential Revision: https://phabricator.services.mozilla.com/D251456
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jun 1, 2025
… text transformed by the default policy. r=smaug

This verifies that the source text transformed by the default policy is used
for various steps of "prepare the script element":

https://html.spec.whatwg.org/#prepare-the-script-element
PR w3c/trusted-types#579

Differential Revision: https://phabricator.services.mozilla.com/D251456

UltraBlame original commit: b40ba3e6cd668c9890ed7e4c6bdfdf2ee60cbcc4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jun 1, 2025
… text transformed by the default policy. r=smaug

This verifies that the source text transformed by the default policy is used
for various steps of "prepare the script element":

https://html.spec.whatwg.org/#prepare-the-script-element
PR w3c/trusted-types#579

Differential Revision: https://phabricator.services.mozilla.com/D251456

UltraBlame original commit: b40ba3e6cd668c9890ed7e4c6bdfdf2ee60cbcc4
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jun 1, 2025
… text transformed by the default policy. r=smaug

This verifies that the source text transformed by the default policy is used
for various steps of "prepare the script element":

https://html.spec.whatwg.org/#prepare-the-script-element
PR w3c/trusted-types#579

Differential Revision: https://phabricator.services.mozilla.com/D251456

UltraBlame original commit: b40ba3e6cd668c9890ed7e4c6bdfdf2ee60cbcc4
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 2, 2025
…ormed by the default policy.

This verifies that the source text transformed by the default policy is used
for various steps of "prepare the script element":

https://html.spec.whatwg.org/#prepare-the-script-element
PR w3c/trusted-types#579

Differential Revision: https://phabricator.services.mozilla.com/D251456

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1968383
gecko-commit: b40ba3e6cd668c9890ed7e4c6bdfdf2ee60cbcc4
gecko-reviewers: smaug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants