Chromium Code Reviews| 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) |