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

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: 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..047ad5463ee1c05749aecb32db2cc83b0f01aa1b 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.
+use_idl_event_style = set(['ScriptProcessorNode'])
blois 2012/12/07 23:40:00 The name seems a bit odd- this is basically the co
Emily Fortuna 2012/12/07 23:58:22 No. The items in "use_idl_event_style" have attr.t
+
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 use_idl_event_style or (
+ not event_names and interface.id not in _html_explicit_event_classes):
return None
self._event_classes.add(interface.id)

Powered by Google App Engine
This is Rietveld 408576698