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

Unified Diff: sdk/lib/html/scripts/htmleventgenerator.py

Issue 11469039: Make ScriptProcessorNode not a proper event (because it isn't). This fixes the last of the static a… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: renamed non-event variable in script Created 8 years 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: sdk/lib/html/scripts/htmleventgenerator.py
diff --git a/sdk/lib/html/scripts/htmleventgenerator.py b/sdk/lib/html/scripts/htmleventgenerator.py
index 2489d127528e11beefa3eab8aaecfa4735c94d5a..c8c95e12b7525c9d552ce540b9f797846f1cb2e0 100644
--- a/sdk/lib/html/scripts/htmleventgenerator.py
+++ b/sdk/lib/html/scripts/htmleventgenerator.py
@@ -187,6 +187,12 @@ _html_event_names = {
# doesn't match the interface hierarchy.
_html_explicit_event_classes = set(['DocumentFragment'])
+# These classes are not really proper events targets, even though the IDL claims
+# they are. We don't make these the dart-style event names since they're not
+# really events -- the user uses them the same way they would use any other
+# event in JavaScript -- by assigning an event handler function.
+html_override_event_classes = set(['ScriptProcessorNode'])
+
class HtmlEventGenerator(object):
def __init__(self, database, renamer, template_loader):
@@ -208,7 +214,8 @@ class HtmlEventGenerator(object):
if attr.type.id == 'EventListener' and attr.id[2:] in event_names:
event_names.remove(attr.id[2:])
- if not event_names and interface.id not in _html_explicit_event_classes:
+ if interface.id in html_override_event_classes or (
+ not event_names and interface.id not in _html_explicit_event_classes):
return None
self._event_classes.add(interface.id)
« no previous file with comments | « sdk/lib/html/scripts/htmldartgenerator.py ('k') | sdk/lib/html/templates/html/impl/impl_ScriptProcessorNode.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698