diff options
author | Moonchild <moonchild@palemoon.org> | 2021-04-19 20:47:29 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-04-19 20:47:29 +0000 |
commit | 1adcb410fb81c01f2840c311e6c1aa1a07564987 (patch) | |
tree | efb7a26701e3adb1be0a57754ddf7bf6e4531b7e /dom/html/HTMLLinkElement.h | |
parent | bd5a7062eb0444f90f8aa3428f0a2aeca17ca351 (diff) | |
download | aura-central-1adcb410fb81c01f2840c311e6c1aa1a07564987.tar.gz |
[DOM] Add missing IDL definitions for CSP .nonce attributes.
Apparently Mozilla completely spaced out on this when adding the CSP nonce
mechanism, potentially causing web compat issues if scripting relies on
being able to get/set nonces through DOM and/or causing CSP policy check
issues if websites try to "hide" nonces.
Diffstat (limited to 'dom/html/HTMLLinkElement.h')
-rw-r--r-- | dom/html/HTMLLinkElement.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dom/html/HTMLLinkElement.h b/dom/html/HTMLLinkElement.h index 8575d5b49..aca16d56a 100644 --- a/dom/html/HTMLLinkElement.h +++ b/dom/html/HTMLLinkElement.h @@ -109,6 +109,14 @@ public: SetHTMLAttr(nsGkAtoms::rel, aRel, aRv); } nsDOMTokenList* RelList(); + void GetNonce(nsAString& aNonce) const + { + GetHTMLAttr(nsGkAtoms::nonce, aNonce); + } + void SetNonce(const nsAString& aNonce, ErrorResult& aRv) + { + SetHTMLAttr(nsGkAtoms::nonce, aNonce, aRv); + } // XPCOM GetMedia is fine. void SetMedia(const nsAString& aMedia, ErrorResult& aRv) { |