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

Side by Side Diff: tools/dom/templates/html/impl/impl_Event.darttemplate

Issue 12047020: Adding supported checks to media events (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 9 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
10 // In JS, canBubble and cancelable are technically required parameters to 10 // In JS, canBubble and cancelable are technically required parameters to
11 // init*Event. In practice, though, if they aren't provided they simply 11 // init*Event. In practice, though, if they aren't provided they simply
12 // default to false (since that's Boolean(undefined)). 12 // default to false (since that's Boolean(undefined)).
13 // 13 //
14 // Contrary to JS, we default canBubble and cancelable to true, since that's 14 // Contrary to JS, we default canBubble and cancelable to true, since that's
15 // what people want most of the time anyway. 15 // what people want most of the time anyway.
16 factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true ]) => 16 factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true ]) =>
17 _$(CLASSNAME)FactoryProvider.create$CLASSNAME(type, canBubble, cancelable) ; 17 _$(CLASSNAME)FactoryProvider.create$CLASSNAME(type, canBubble, cancelable) ;
18 $!MEMBERS 18 $!MEMBERS
19
20 /**
21 * Checks to see if the event class is supported by the current platform.
22 */
23 static bool _isTypeSupported(String eventType) {
24 // Browsers throw for unsupported event names.
25 try {
26 var e = document.$dom_createEvent(eventType);
27 return e is Event;
28 } catch (_) { }
29 return false;
30 }
19 } 31 }
OLDNEW
« no previous file with comments | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698