summaryrefslogtreecommitdiff
path: root/dom/html/HTMLLinkElement.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-04-19 20:47:29 +0000
committerMoonchild <moonchild@palemoon.org>2021-04-19 20:47:29 +0000
commit1adcb410fb81c01f2840c311e6c1aa1a07564987 (patch)
treeefb7a26701e3adb1be0a57754ddf7bf6e4531b7e /dom/html/HTMLLinkElement.h
parentbd5a7062eb0444f90f8aa3428f0a2aeca17ca351 (diff)
downloadaura-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.h8
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)
{