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." |