Repository navigation
Add runScripts to SetHTMLUnsafeOptions - #12495
Merged
Merged
Conversation
Contributor
Author
|
Re multiple implementer support - I've filed WebKit/standards-positions#629 and |
annevk
reviewed
May 27, 2026
runScripts to SetHTMLUnsafeOptions.runScripts to SetHTMLUnsafeOptions
This was referenced May 28, 2026
Contributor
Author
|
Ping? Not sure there's additional actions for me here... |
annevk
approved these changes
Jun 8, 2026
annevk
left a comment
Member
There was a problem hiding this comment.
You can consider WebKit interested.
| <li><p><span>Assert</span>: <var>safe</var> is false.</p></li> | ||
|
|
||
| <li><p>Set <var>scriptingMode</var> to <span | ||
| data-x="scripting-mode-fragment">Fragment</span></p>. |
Member
There was a problem hiding this comment.
The dot is after the closing tag?
| HTML parser. If the <var>options</var> dictionary contains a "<code | ||
| data-x="dom-SetHTMLUnsafeOptions-sanitizer">sanitizer</code>" member, it is used to | ||
| <span>sanitize</span> the parsed fragment before it is inserted into <var>element</var>.</p></dd> | ||
| <span>sanitize</span> the parsed fragment before it is inserted into <var>element</var>. If the |
Member
There was a problem hiding this comment.
Double space before "If" is wrong.
| <span>sanitize</span> the parsed fragment before it is inserted into <var>element</var>. If the | ||
| <var>options</var> dictionary's "<code | ||
| data-x="dom-SetHTMLUnsafeOptions-runScripts">runScripts</code>" member is true, scripts contained | ||
| in <var>html</var> will be executed immediately after the DOM is updated.</p></dd> |
Member
There was a problem hiding this comment.
I think instead of "the DOM" we should use "the node tree" throughout.
When true, scripts are executed after the DOM is updated. This uses the "scripting mode" mechanism used by `createContextualFragment`. Closes whatwg#10090
Contributor
Author
|
All nits fixed I think (I don't have merge rights if this is ready to be merged) |
annevk
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Jun 8, 2026
lando-worker Bot
pushed a commit
to mozilla-firefox/firefox
that referenced
this pull request
Jun 9, 2026
…Scripts test, a=testonly Automatic update from web-platform-tests Remove .tentative from setHTMLUnsafe-runScripts test See whatwg/html#12495. -- wpt-commits: 865f9f4372b6c07b4f057c15765d2dc86e294c20 wpt-pr: 60234
zerox80
pushed a commit
to zerox80/firefox
that referenced
this pull request
Oct 16, 2026
…Scripts test, a=testonly Automatic update from web-platform-tests Remove .tentative from setHTMLUnsafe-runScripts test See whatwg/html#12495. -- wpt-commits: 865f9f4372b6c07b4f057c15765d2dc86e294c20 wpt-pr: 60234
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
runScriptsis true, scripts are executed after the DOM is updated. This uses the "scripting mode" mechanism used bycreateContextualFragment.Note that this is only valid in
setHTMLUnsafe. "Safe" variants (setHTML) and variants that create a new document (pareHTMLUnsafe) never execute scripts.Closes #10090
(See WHATWG Working Mode: Changes for more details.)
/dom.html ( diff )
/dynamic-markup-insertion.html ( diff )