Skip to content

Commit

Permalink
Bug 1925468 - Implement Trusted Type support for setAttribute/setAttr…
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-c committed Dec 1, 2024
1 parent a96f6ac commit 86d1355
Show file tree
Hide file tree
Showing 11 changed files with 1,190 additions and 1,927 deletions.
445 changes: 445 additions & 0 deletions dom/base/Element.cpp

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions dom/base/Element.h
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,9 @@ TrustedHTML
class
TrustedHTMLOrNullIsEmptyString
;
class
TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString
;
/
/
IID
Expand Down Expand Up @@ -7695,6 +7698,76 @@ aError
)
;
}
MOZ_CAN_RUN_SCRIPT
void
SetAttribute
(
const
nsAString
&
aName
const
TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString
&
aValue
nsIPrincipal
*
aTriggeringPrincipal
ErrorResult
&
aError
)
;
MOZ_CAN_RUN_SCRIPT
void
SetAttributeNS
(
const
nsAString
&
aNamespaceURI
const
nsAString
&
aLocalName
const
TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString
&
aValue
nsIPrincipal
*
aTriggeringPrincipal
ErrorResult
&
aError
)
;
MOZ_CAN_RUN_SCRIPT
void
SetAttribute
(
const
nsAString
&
aName
const
TrustedHTMLOrTrustedScriptOrTrustedScriptURLOrString
&
aValue
ErrorResult
&
aError
)
{
SetAttribute
(
aName
aValue
nullptr
aError
)
;
}
/
*
*
Expand Down
Loading

0 comments on commit 86d1355

Please sign in to comment.