OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
6 | 6 |
7 part of html; | 7 part of html; |
8 | 8 |
9 /// @domName $DOMNAME; @docsEditable true | 9 /// @domName $DOMNAME; @docsEditable true |
10 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 10 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
11 // In JS, canBubble and cancelable are technically required parameters to | 11 // In JS, canBubble and cancelable are technically required parameters to |
12 // init*Event. In practice, though, if they aren't provided they simply | 12 // init*Event. In practice, though, if they aren't provided they simply |
13 // default to false (since that's Boolean(undefined)). | 13 // default to false (since that's Boolean(undefined)). |
14 // | 14 // |
15 // Contrary to JS, we default canBubble and cancelable to true, since that's | 15 // Contrary to JS, we default canBubble and cancelable to true, since that's |
16 // what people want most of the time anyway. | 16 // what people want most of the time anyway. |
17 factory $CLASSNAME(String type, Window view, int detail, | 17 factory $CLASSNAME(String type, Window view, int detail, |
18 [bool canBubble = true, bool cancelable = true]) { | 18 [bool canBubble = true, bool cancelable = true]) { |
19 final e = document.$dom_createEvent("UIEvent"); | 19 final e = document.$dom_createEvent("UIEvent"); |
20 e.$dom_initUIEvent(type, canBubble, cancelable, view, detail); | 20 e.$dom_initUIEvent(type, canBubble, cancelable, view, detail); |
21 return e; | 21 return e; |
22 } | 22 } |
23 $!MEMBERS | 23 $!MEMBERS |
24 } | 24 } |
OLD | NEW |