mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
Implement trusted types for setAttribute (#38700)
Callers now call `set_attribute` directly, to avoid the trusted types machinery, as well as skip validation. That's not required by spec as well. This implements part of the DOM integration from https://github.com/whatwg/dom/pull/1268 Part of #36258 Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
parent
8290761066
commit
18e05d3aab
18 changed files with 217 additions and 240 deletions
|
@ -45,9 +45,9 @@ interface Element : Node {
|
|||
[CEReactions, Throws]
|
||||
boolean toggleAttribute(DOMString name, optional boolean force);
|
||||
[CEReactions, Throws]
|
||||
undefined setAttribute(DOMString name, DOMString value);
|
||||
undefined setAttribute(DOMString name, (TrustedType or DOMString) value);
|
||||
[CEReactions, Throws]
|
||||
undefined setAttributeNS(DOMString? namespace, DOMString name, DOMString value);
|
||||
undefined setAttributeNS(DOMString? namespace, DOMString name, (TrustedType or DOMString) value);
|
||||
[CEReactions]
|
||||
undefined removeAttribute(DOMString name);
|
||||
[CEReactions]
|
||||
|
|
|
@ -36,3 +36,5 @@ dictionary TrustedTypePolicyOptions {
|
|||
callback CreateHTMLCallback = DOMString? (DOMString input, any... arguments);
|
||||
callback CreateScriptCallback = DOMString? (DOMString input, any... arguments);
|
||||
callback CreateScriptURLCallback = USVString? (DOMString input, any... arguments);
|
||||
|
||||
typedef (TrustedHTML or TrustedScript or TrustedScriptURL) TrustedType;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue