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

Unified Diff: third_party/WebKit/Source/core/dom/ScriptLoader.cpp

Issue 2877223002: Fix module scripts with for/event attributes (Closed)
Patch Set: Title Created 3 years, 7 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/dom/ScriptLoader.cpp
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index 198e1967b32ed1ebbfa66aae6b51a23354cad32e..539e13029483d9f136e589f05157e11d7fae3077 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -964,8 +964,8 @@ bool ScriptLoader::IsScriptForEventSupported() const {
// "If the script element has an event attribute and a for attribute, and
// the script's type is "classic", then run these substeps:"
- // TODO(hiroshige): Check the script's type.
- if (event_attribute.IsNull() || for_attribute.IsNull())
+ if (GetScriptType() != ScriptType::kClassic || event_attribute.IsNull() ||
+ for_attribute.IsNull())
return true;
// 3. "Strip leading and trailing ASCII whitespace from event and for."

Powered by Google App Engine
This is Rietveld 408576698