Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Unified Diff: third_party/WebKit/Source/core/html/HTMLScriptElement.h

Issue 2628733005: Experiment with hiding <script>'s 'nonce' content attribute. (Closed)
Patch Set: Ugh. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLScriptElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLScriptElement.h b/third_party/WebKit/Source/core/html/HTMLScriptElement.h
index 223a8fd905a2f15d62b615d7614d643d419b4c7e..b267bacb46b4f09eafc5ce1b4cb0d90c261c706f 100644
--- a/third_party/WebKit/Source/core/html/HTMLScriptElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLScriptElement.h
@@ -52,6 +52,11 @@ class CORE_EXPORT HTMLScriptElement final : public HTMLElement,
ScriptLoader* loader() const { return m_loader.get(); }
+ // ScriptLoaderClient
+ AtomicString nonce() const override { return m_nonce; }
+ void setNonce(const String& nonce) override { m_nonce = AtomicString(nonce); }
+ void clearNonce() override { m_nonce = emptyAtom; }
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -85,6 +90,7 @@ class CORE_EXPORT HTMLScriptElement final : public HTMLElement,
Element* cloneElementWithoutAttributesAndChildren() override;
Member<ScriptLoader> m_loader;
+ AtomicString m_nonce;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698