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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 14387011: fix a bug in the Event constructor (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /// The Dart HTML library. 1 /// The Dart HTML library.
2 library dart.dom.html; 2 library dart.dom.html;
3 3
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:collection'; 5 import 'dart:collection';
6 import 'dart:_collection-dev'; 6 import 'dart:_collection-dev';
7 import 'dart:html_common'; 7 import 'dart:html_common';
8 import 'dart:indexed_db'; 8 import 'dart:indexed_db';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:json' as json; 10 import 'dart:json' as json;
(...skipping 9528 matching lines...) Expand 10 before | Expand all | Expand 10 after
9539 class Event native "Event" { 9539 class Event native "Event" {
9540 // In JS, canBubble and cancelable are technically required parameters to 9540 // In JS, canBubble and cancelable are technically required parameters to
9541 // init*Event. In practice, though, if they aren't provided they simply 9541 // init*Event. In practice, though, if they aren't provided they simply
9542 // default to false (since that's Boolean(undefined)). 9542 // default to false (since that's Boolean(undefined)).
9543 // 9543 //
9544 // Contrary to JS, we default canBubble and cancelable to true, since that's 9544 // Contrary to JS, we default canBubble and cancelable to true, since that's
9545 // what people want most of the time anyway. 9545 // what people want most of the time anyway.
9546 factory Event(String type, 9546 factory Event(String type,
9547 {bool canBubble: true, bool cancelable: true}) { 9547 {bool canBubble: true, bool cancelable: true}) {
9548 return new Event.eventType('Event', type, canBubble: canBubble, 9548 return new Event.eventType('Event', type, canBubble: canBubble,
9549 cancelable: canBubble); 9549 cancelable: cancelable);
9550 } 9550 }
9551 9551
9552 /** 9552 /**
9553 * Creates a new Event object of the specified type. 9553 * Creates a new Event object of the specified type.
9554 * 9554 *
9555 * This is analogous to document.createEvent. 9555 * This is analogous to document.createEvent.
9556 * Normally events should be created via their constructors, if available. 9556 * Normally events should be created via their constructors, if available.
9557 * 9557 *
9558 * var e = new Event.type('MouseEvent', 'mousedown', true, true); 9558 * var e = new Event.type('MouseEvent', 'mousedown', true, true);
9559 */ 9559 */
(...skipping 20032 matching lines...) Expand 10 before | Expand all | Expand 10 after
29592 _position = nextPosition; 29592 _position = nextPosition;
29593 return true; 29593 return true;
29594 } 29594 }
29595 _current = null; 29595 _current = null;
29596 _position = _array.length; 29596 _position = _array.length;
29597 return false; 29597 return false;
29598 } 29598 }
29599 29599
29600 T get current => _current; 29600 T get current => _current;
29601 } 29601 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698