Chromium Code Reviews| Index: tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate |
| diff --git a/tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate b/tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate |
| index 5db4acd77a5570b695af03069812bda25a2eaf45..5be12e8116e39610f87d8ef39f8da84179546e73 100644 |
| --- a/tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate |
| +++ b/tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate |
| @@ -9,13 +9,26 @@ part of $LIBRARYNAME; |
| $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { |
| factory $CLASSNAME(String type, |
| {bool canBubble: false, bool cancelable: false, Window view, |
| - String data}) { |
| + String data, String locale}) { |
| if (view == null) { |
| view = window; |
| } |
| var e = document._createEvent("CompositionEvent"); |
| - e._initCompositionEvent(type, canBubble, cancelable, view, data); |
| + |
| +$if DART2JS |
| + if (Device.isFirefox) { |
| + // Firefox requires the locale parameter that isn't supported elsewhere. |
| + JS('void', '#.initCompositionEvent(#, #, #, #, #, null)', |
|
terry
2015/05/11 21:34:25
Should we be passing locale or should it always be
Alan Knight
2015/05/12 00:25:26
We should pass locale down. Done.
|
| + e, type, canBubble, cancelable, view, data); |
| + } else { |
| + e._initCompositionEvent(type, canBubble, cancelable, view, data); |
| + } |
| +$else |
| + e._initCompositionEvent(type, canBubble, cancelable, view, data); |
| +$endif |
| + |
| return e; |
| } |
| + |
| $!MEMBERS |
| } |