Commit 697d07aa authored by Mason Freed's avatar Mason Freed Committed by Commit Bot

Mark setInnerHTML as a TrustedHTML sink

This ensures Trusted Types are aware of setInnerHTML as a
powerful sink.

Bug: 1042130
Change-Id: I292acc3081e26aa42f101442fb778635d0c79649
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536082
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Reviewed-by: default avatarJoey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827179}
parent 0ebc3990
...@@ -97,7 +97,7 @@ callback ScrollStateCallback = void (ScrollState scrollState); ...@@ -97,7 +97,7 @@ callback ScrollStateCallback = void (ScrollState scrollState);
[CEReactions, CustomElementCallbacks, RaisesException] void insertAdjacentHTML(DOMString position, HTMLString text); [CEReactions, CustomElementCallbacks, RaisesException] void insertAdjacentHTML(DOMString position, HTMLString text);
// Declarative Shadow DOM setInnerHTML/getInnerHTML() functions. // Declarative Shadow DOM setInnerHTML/getInnerHTML() functions.
[Affects=Nothing, RuntimeEnabled=DeclarativeShadowDOM, RuntimeCallStatsCounter=ElementSetInnerHTML, RaisesException, ImplementedAs=setInnerHTMLWithOptions] void setInnerHTML(DOMString html, optional SetInnerHTMLOptions options = {}); [Affects=Nothing, RuntimeEnabled=DeclarativeShadowDOM, RuntimeCallStatsCounter=ElementSetInnerHTML, RaisesException, ImplementedAs=setInnerHTMLWithOptions] void setInnerHTML(HTMLString html, optional SetInnerHTMLOptions options = {});
[Affects=Nothing, RuntimeEnabled=DeclarativeShadowDOM, RuntimeCallStatsCounter=ElementGetInnerHTML] HTMLString getInnerHTML(optional GetInnerHTMLOptions options = {}); [Affects=Nothing, RuntimeEnabled=DeclarativeShadowDOM, RuntimeCallStatsCounter=ElementGetInnerHTML] HTMLString getInnerHTML(optional GetInnerHTMLOptions options = {});
// Pointer Lock // Pointer Lock
......
...@@ -38,7 +38,7 @@ interface ShadowRoot : DocumentFragment { ...@@ -38,7 +38,7 @@ interface ShadowRoot : DocumentFragment {
// Declarative Shadow DOM setInnerHTML function. // Declarative Shadow DOM setInnerHTML function.
// TODO(crbug.com/1147752): Add getInnerHTML() here also. // TODO(crbug.com/1147752): Add getInnerHTML() here also.
[Affects=Nothing, RuntimeEnabled=DeclarativeShadowDOM, RaisesException, ImplementedAs=setInnerHTMLWithOptions] void setInnerHTML(DOMString html, optional SetInnerHTMLOptions options = {}); [Affects=Nothing, RuntimeEnabled=DeclarativeShadowDOM, RaisesException, ImplementedAs=setInnerHTMLWithOptions] void setInnerHTML(HTMLString html, optional SetInnerHTMLOptions options = {});
}; };
ShadowRoot includes DocumentOrShadowRoot; ShadowRoot includes DocumentOrShadowRoot;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment