diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-10 13:28:03 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-10 13:28:03 +0200 |
commit | e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc (patch) | |
tree | a3e4bc52cb2fdce52d8dbf88a4db41d81017c1b8 /dom/html/HTMLScriptElement.cpp | |
parent | 100c6a7e95b8e9624fc43fabc96d88070635d1ef (diff) | |
download | UXP-e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc.tar UXP-e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc.tar.gz UXP-e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc.tar.lz UXP-e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc.tar.xz UXP-e0a8dcfed131ffa58a5e2cb1d30fe48c745c2fdc.zip |
Bug 1330900 - Implement <script nomodule>
This patch implements:
- noModule getter/setter for HTMLScriptElement
- the nomodule attribute for HTMLScriptElement
- the logic in nsScriptLoader that denies the loading of a nomodule script
- tests
Tag #618
Diffstat (limited to 'dom/html/HTMLScriptElement.cpp')
-rw-r--r-- | dom/html/HTMLScriptElement.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/dom/html/HTMLScriptElement.cpp b/dom/html/HTMLScriptElement.cpp index 94d09c12c..095b9b77d 100644 --- a/dom/html/HTMLScriptElement.cpp +++ b/dom/html/HTMLScriptElement.cpp @@ -218,6 +218,18 @@ HTMLScriptElement::SetAsync(bool aValue, ErrorResult& rv) SetHTMLBoolAttr(nsGkAtoms::async, aValue, rv); } +bool +HTMLScriptElement::NoModule() +{ + return GetBoolAttr(nsGkAtoms::nomodule); +} + +void +HTMLScriptElement::SetNoModule(bool aValue, ErrorResult& aRv) +{ + SetHTMLBoolAttr(nsGkAtoms::nomodule, aValue, aRv); +} + nsresult HTMLScriptElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName, const nsAttrValue* aValue, bool aNotify) |