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

Side by Side Diff: lib/runtime/dart/html.js

Issue 1633003002: Add --modules=node support (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: reverted let->const parasite change Created 4 years, 10 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
OLDNEW
1 dart_library.library('dart/html', null, /* Imports */[ 1 dart_library.library('dart/html', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
3 'dart/math', 3 'dart/math',
4 'dart/core', 4 'dart/core',
5 'dart/_js_helper', 5 'dart/_js_helper',
6 'dart/collection', 6 'dart/collection',
7 'dart/async', 7 'dart/async',
8 'dart/_foreign_helper', 8 'dart/_foreign_helper',
9 'dart/isolate' 9 'dart/isolate'
10 ], /* Lazy imports */[ 10 ], /* Lazy imports */[
11 'dart/_metadata', 11 'dart/_metadata',
12 'dart/html_common' 12 'dart/html_common'
13 ], function(exports, dart, math, core, _js_helper, collection, async, _foreign_h elper, isolate, _metadata, html_common) { 13 ], function(exports, dart, math, core, _js_helper, collection, $async, _foreign_ helper, isolate, _metadata, html_common) {
14 'use strict'; 14 'use strict';
15 let dartx = dart.dartx; 15 let dartx = dart.dartx;
16 dart.export(exports, math, ['Rectangle', 'Point'], []); 16 dart.export(exports, math, ['Rectangle', 'Point'], []);
17 class DartHtmlDomObject extends core.Object { 17 class DartHtmlDomObject extends core.Object {
18 DartHtmlDomObject() { 18 DartHtmlDomObject() {
19 this.raw = null; 19 this.raw = null;
20 } 20 }
21 internal_() { 21 internal_() {
22 this.raw = null; 22 this.raw = null;
23 } 23 }
(...skipping 5488 matching lines...) Expand 10 before | Expand all | Expand 10 after
5512 class Events extends core.Object { 5512 class Events extends core.Object {
5513 Events(ptr) { 5513 Events(ptr) {
5514 this[_ptr] = ptr; 5514 this[_ptr] = ptr;
5515 } 5515 }
5516 get(type) { 5516 get(type) {
5517 return new _EventStream(this[_ptr], type, false); 5517 return new _EventStream(this[_ptr], type, false);
5518 } 5518 }
5519 } 5519 }
5520 dart.setSignature(Events, { 5520 dart.setSignature(Events, {
5521 constructors: () => ({Events: [Events, [EventTarget]]}), 5521 constructors: () => ({Events: [Events, [EventTarget]]}),
5522 methods: () => ({get: [async.Stream, [core.String]]}) 5522 methods: () => ({get: [$async.Stream, [core.String]]})
5523 }); 5523 });
5524 class ElementEvents extends Events { 5524 class ElementEvents extends Events {
5525 ElementEvents(ptr) { 5525 ElementEvents(ptr) {
5526 super.Events(ptr); 5526 super.Events(ptr);
5527 } 5527 }
5528 get(type) { 5528 get(type) {
5529 if (dart.notNull(ElementEvents.webkitEvents.keys[dartx.contains](type[dart x.toLowerCase]()))) { 5529 if (dart.notNull(ElementEvents.webkitEvents.keys[dartx.contains](type[dart x.toLowerCase]()))) {
5530 if (dart.notNull(html_common.Device.isWebKit)) { 5530 if (dart.notNull(html_common.Device.isWebKit)) {
5531 return new _ElementEventStreamImpl(this[_ptr], ElementEvents.webkitEve nts.get(type[dartx.toLowerCase]()), false); 5531 return new _ElementEventStreamImpl(this[_ptr], ElementEvents.webkitEve nts.get(type[dartx.toLowerCase]()), false);
5532 } 5532 }
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
6127 return HttpRequest.request(url, {method: 'POST', withCredentials: withCred entials, responseType: responseType, requestHeaders: requestHeaders, sendData: f ormData, onProgress: onProgress}); 6127 return HttpRequest.request(url, {method: 'POST', withCredentials: withCred entials, responseType: responseType, requestHeaders: requestHeaders, sendData: f ormData, onProgress: onProgress});
6128 } 6128 }
6129 static request(url, opts) { 6129 static request(url, opts) {
6130 let method = opts && 'method' in opts ? opts.method : null; 6130 let method = opts && 'method' in opts ? opts.method : null;
6131 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent ials : null; 6131 let withCredentials = opts && 'withCredentials' in opts ? opts.withCredent ials : null;
6132 let responseType = opts && 'responseType' in opts ? opts.responseType : nu ll; 6132 let responseType = opts && 'responseType' in opts ? opts.responseType : nu ll;
6133 let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null; 6133 let mimeType = opts && 'mimeType' in opts ? opts.mimeType : null;
6134 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader s : null; 6134 let requestHeaders = opts && 'requestHeaders' in opts ? opts.requestHeader s : null;
6135 let sendData = opts && 'sendData' in opts ? opts.sendData : null; 6135 let sendData = opts && 'sendData' in opts ? opts.sendData : null;
6136 let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null; 6136 let onProgress = opts && 'onProgress' in opts ? opts.onProgress : null;
6137 let completer = async.Completer$(HttpRequest).new(); 6137 let completer = $async.Completer$(HttpRequest).new();
6138 let xhr = HttpRequest.new(); 6138 let xhr = HttpRequest.new();
6139 if (method == null) { 6139 if (method == null) {
6140 method = 'GET'; 6140 method = 'GET';
6141 } 6141 }
6142 xhr.open(method, url, {async: true}); 6142 xhr.open(method, url, {async: true});
6143 if (withCredentials != null) { 6143 if (withCredentials != null) {
6144 xhr.withCredentials = withCredentials; 6144 xhr.withCredentials = withCredentials;
6145 } 6145 }
6146 if (responseType != null) { 6146 if (responseType != null) {
6147 xhr.responseType = responseType; 6147 xhr.responseType = responseType;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
6187 } 6187 }
6188 static get supportsOverrideMimeType() { 6188 static get supportsOverrideMimeType() {
6189 return true; 6189 return true;
6190 } 6190 }
6191 static requestCrossOrigin(url, opts) { 6191 static requestCrossOrigin(url, opts) {
6192 let method = opts && 'method' in opts ? opts.method : null; 6192 let method = opts && 'method' in opts ? opts.method : null;
6193 let sendData = opts && 'sendData' in opts ? opts.sendData : null; 6193 let sendData = opts && 'sendData' in opts ? opts.sendData : null;
6194 if (dart.notNull(HttpRequest.supportsCrossOrigin)) { 6194 if (dart.notNull(HttpRequest.supportsCrossOrigin)) {
6195 return dart.as(HttpRequest.request(url, {method: method, sendData: sendD ata}).then(dart.fn(xhr => { 6195 return dart.as(HttpRequest.request(url, {method: method, sendData: sendD ata}).then(dart.fn(xhr => {
6196 return xhr.responseText; 6196 return xhr.responseText;
6197 }, dart.dynamic, [HttpRequest])), async.Future$(core.String)); 6197 }, dart.dynamic, [HttpRequest])), $async.Future$(core.String));
6198 } 6198 }
6199 } 6199 }
6200 get responseHeaders() { 6200 get responseHeaders() {
6201 let headers = dart.map(); 6201 let headers = dart.map();
6202 let headersString = this.getAllResponseHeaders(); 6202 let headersString = this.getAllResponseHeaders();
6203 if (headersString == null) { 6203 if (headersString == null) {
6204 return headers; 6204 return headers;
6205 } 6205 }
6206 let headersList = headersString[dartx.split]('\r\n'); 6206 let headersList = headersString[dartx.split]('\r\n');
6207 for (let header of headersList) { 6207 for (let header of headersList) {
6208 if (dart.notNull(header[dartx.isEmpty])) { 6208 if (dart.notNull(header[dartx.isEmpty])) {
6209 continue; 6209 continue;
6210 } 6210 }
6211 let splitIdx = header[dartx.indexOf](': '); 6211 let splitIdx = header[dartx.indexOf](': ');
6212 if (splitIdx == -1) { 6212 if (splitIdx == -1) {
6213 continue; 6213 continue;
6214 } 6214 }
6215 let key = header[dartx.substring](0, splitIdx)[dartx.toLowerCase](); 6215 let key = header[dartx.substring](0, splitIdx)[dartx.toLowerCase]();
6216 let value = header[dartx.substring](dart.notNull(splitIdx) + 2); 6216 let value = header[dartx.substring](dart.notNull(splitIdx) + 2);
6217 if (dart.notNull(headers.containsKey(key))) { 6217 if (dart.notNull(headers.containsKey(key))) {
6218 headers.set(key, `${headers.get(key)}, ${value}`); 6218 headers.set(key, `${headers.get(key)}, ${value}`);
6219 } else { 6219 } else {
6220 headers.set(key, value); 6220 headers.set(key, value);
6221 } 6221 }
6222 } 6222 }
6223 return headers; 6223 return headers;
6224 } 6224 }
6225 open(method, url, opts) { 6225 open(method, url, opts) {
6226 let async = opts && 'async' in opts ? opts.async : null; 6226 let async$ = opts && 'async' in opts ? opts.async : null;
6227 let user = opts && 'user' in opts ? opts.user : null; 6227 let user = opts && 'user' in opts ? opts.user : null;
6228 let password = opts && 'password' in opts ? opts.password : null; 6228 let password = opts && 'password' in opts ? opts.password : null;
6229 if (async == null && user == null && password == null) { 6229 if (async$ == null && user == null && password == null) {
6230 this.raw.open(method, url); 6230 this.raw.open(method, url);
6231 } else { 6231 } else {
6232 this.raw.open(method, url, async, user, password); 6232 this.raw.open(method, url, async$, user, password);
6233 } 6233 }
6234 } 6234 }
6235 get responseType() { 6235 get responseType() {
6236 return this.raw.responseType; 6236 return this.raw.responseType;
6237 } 6237 }
6238 set responseType(value) { 6238 set responseType(value) {
6239 this.raw.responseType = value; 6239 this.raw.responseType = value;
6240 } 6240 }
6241 static _() { 6241 static _() {
6242 dart.throw(new core.UnsupportedError("Not supported")); 6242 dart.throw(new core.UnsupportedError("Not supported"));
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
6372 overrideMimeType: [dart.void, [core.String]], 6372 overrideMimeType: [dart.void, [core.String]],
6373 [_overrideMimeType_1]: [dart.void, [dart.dynamic]], 6373 [_overrideMimeType_1]: [dart.void, [dart.dynamic]],
6374 send: [dart.void, [], [dart.dynamic]], 6374 send: [dart.void, [], [dart.dynamic]],
6375 [_send_1]: [dart.void, []], 6375 [_send_1]: [dart.void, []],
6376 [_send_2]: [dart.void, [Document]], 6376 [_send_2]: [dart.void, [Document]],
6377 [_send_3]: [dart.void, [core.String]], 6377 [_send_3]: [dart.void, [core.String]],
6378 setRequestHeader: [dart.void, [core.String, core.String]], 6378 setRequestHeader: [dart.void, [core.String, core.String]],
6379 [_setRequestHeader_1]: [dart.void, [dart.dynamic, dart.dynamic]] 6379 [_setRequestHeader_1]: [dart.void, [dart.dynamic, dart.dynamic]]
6380 }), 6380 }),
6381 statics: () => ({ 6381 statics: () => ({
6382 getString: [async.Future$(core.String), [core.String], {withCredentials: c ore.bool, onProgress: dart.functionType(dart.void, [ProgressEvent])}], 6382 getString: [$async.Future$(core.String), [core.String], {withCredentials: core.bool, onProgress: dart.functionType(dart.void, [ProgressEvent])}],
6383 postFormData: [async.Future$(HttpRequest), [core.String, core.Map$(core.St ring, core.String)], {withCredentials: core.bool, responseType: core.String, req uestHeaders: core.Map$(core.String, core.String), onProgress: dart.functionType( dart.void, [ProgressEvent])}], 6383 postFormData: [$async.Future$(HttpRequest), [core.String, core.Map$(core.S tring, core.String)], {withCredentials: core.bool, responseType: core.String, re questHeaders: core.Map$(core.String, core.String), onProgress: dart.functionType (dart.void, [ProgressEvent])}],
6384 request: [async.Future$(HttpRequest), [core.String], {method: core.String, withCredentials: core.bool, responseType: core.String, mimeType: core.String, r equestHeaders: core.Map$(core.String, core.String), sendData: dart.dynamic, onPr ogress: dart.functionType(dart.void, [ProgressEvent])}], 6384 request: [$async.Future$(HttpRequest), [core.String], {method: core.String , withCredentials: core.bool, responseType: core.String, mimeType: core.String, requestHeaders: core.Map$(core.String, core.String), sendData: dart.dynamic, onP rogress: dart.functionType(dart.void, [ProgressEvent])}],
6385 requestCrossOrigin: [async.Future$(core.String), [core.String], {method: c ore.String, sendData: core.String}], 6385 requestCrossOrigin: [$async.Future$(core.String), [core.String], {method: core.String, sendData: core.String}],
6386 _create_1: [HttpRequest, []], 6386 _create_1: [HttpRequest, []],
6387 internalCreateHttpRequest: [HttpRequest, []] 6387 internalCreateHttpRequest: [HttpRequest, []]
6388 }), 6388 }),
6389 names: ['getString', 'postFormData', 'request', 'requestCrossOrigin', '_crea te_1', 'internalCreateHttpRequest'] 6389 names: ['getString', 'postFormData', 'request', 'requestCrossOrigin', '_crea te_1', 'internalCreateHttpRequest']
6390 }); 6390 });
6391 HttpRequest[dart.metadata] = () => [dart.const(new _metadata.DomName('XMLHttpR equest')), dart.const(new _js_helper.Native("XMLHttpRequest"))]; 6391 HttpRequest[dart.metadata] = () => [dart.const(new _metadata.DomName('XMLHttpR equest')), dart.const(new _js_helper.Native("XMLHttpRequest"))];
6392 HttpRequest.DONE = 4; 6392 HttpRequest.DONE = 4;
6393 HttpRequest.HEADERS_RECEIVED = 2; 6393 HttpRequest.HEADERS_RECEIVED = 2;
6394 HttpRequest.LOADING = 3; 6394 HttpRequest.LOADING = 3;
6395 HttpRequest.OPENED = 1; 6395 HttpRequest.OPENED = 1;
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
7527 get vendor() { 7527 get vendor() {
7528 return dart.as(wrap_jso(this.raw.vendor), core.String); 7528 return dart.as(wrap_jso(this.raw.vendor), core.String);
7529 } 7529 }
7530 get vendorSub() { 7530 get vendorSub() {
7531 return dart.as(wrap_jso(this.raw.vendorSub), core.String); 7531 return dart.as(wrap_jso(this.raw.vendorSub), core.String);
7532 } 7532 }
7533 getBattery() { 7533 getBattery() {
7534 return this[_getBattery_1](); 7534 return this[_getBattery_1]();
7535 } 7535 }
7536 [_getBattery_1]() { 7536 [_getBattery_1]() {
7537 return dart.as(wrap_jso(this.raw.getBattery()), async.Future); 7537 return dart.as(wrap_jso(this.raw.getBattery()), $async.Future);
7538 } 7538 }
7539 getStorageUpdates() { 7539 getStorageUpdates() {
7540 this[_getStorageUpdates_1](); 7540 this[_getStorageUpdates_1]();
7541 return; 7541 return;
7542 } 7542 }
7543 [_getStorageUpdates_1]() { 7543 [_getStorageUpdates_1]() {
7544 return wrap_jso(this.raw.getStorageUpdates()); 7544 return wrap_jso(this.raw.getStorageUpdates());
7545 } 7545 }
7546 registerProtocolHandler(scheme, url, title) { 7546 registerProtocolHandler(scheme, url, title) {
7547 this[_registerProtocolHandler_1](scheme, url, title); 7547 this[_registerProtocolHandler_1](scheme, url, title);
(...skipping 13 matching lines...) Expand all
7561 } 7561 }
7562 } 7562 }
7563 Navigator[dart.implements] = () => [NavigatorCpu]; 7563 Navigator[dart.implements] = () => [NavigatorCpu];
7564 dart.defineNamedConstructor(Navigator, 'internal_'); 7564 dart.defineNamedConstructor(Navigator, 'internal_');
7565 dart.setSignature(Navigator, { 7565 dart.setSignature(Navigator, {
7566 constructors: () => ({ 7566 constructors: () => ({
7567 _: [Navigator, []], 7567 _: [Navigator, []],
7568 internal_: [Navigator, []] 7568 internal_: [Navigator, []]
7569 }), 7569 }),
7570 methods: () => ({ 7570 methods: () => ({
7571 getBattery: [async.Future, []], 7571 getBattery: [$async.Future, []],
7572 [_getBattery_1]: [async.Future, []], 7572 [_getBattery_1]: [$async.Future, []],
7573 getStorageUpdates: [dart.void, []], 7573 getStorageUpdates: [dart.void, []],
7574 [_getStorageUpdates_1]: [dart.void, []], 7574 [_getStorageUpdates_1]: [dart.void, []],
7575 registerProtocolHandler: [dart.void, [core.String, core.String, core.Strin g]], 7575 registerProtocolHandler: [dart.void, [core.String, core.String, core.Strin g]],
7576 [_registerProtocolHandler_1]: [dart.void, [dart.dynamic, dart.dynamic, dar t.dynamic]], 7576 [_registerProtocolHandler_1]: [dart.void, [dart.dynamic, dart.dynamic, dar t.dynamic]],
7577 sendBeacon: [core.bool, [core.String, core.String]], 7577 sendBeacon: [core.bool, [core.String, core.String]],
7578 [_sendBeacon_1]: [core.bool, [dart.dynamic, dart.dynamic]] 7578 [_sendBeacon_1]: [core.bool, [dart.dynamic, dart.dynamic]]
7579 }), 7579 }),
7580 statics: () => ({internalCreateNavigator: [Navigator, []]}), 7580 statics: () => ({internalCreateNavigator: [Navigator, []]}),
7581 names: ['internalCreateNavigator'] 7581 names: ['internalCreateNavigator']
7582 }); 7582 });
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
8603 const _scrollTo_1 = Symbol('_scrollTo_1'); 8603 const _scrollTo_1 = Symbol('_scrollTo_1');
8604 const _scrollTo_2 = Symbol('_scrollTo_2'); 8604 const _scrollTo_2 = Symbol('_scrollTo_2');
8605 const _scrollTo_3 = Symbol('_scrollTo_3'); 8605 const _scrollTo_3 = Symbol('_scrollTo_3');
8606 const _scrollTo_4 = Symbol('_scrollTo_4'); 8606 const _scrollTo_4 = Symbol('_scrollTo_4');
8607 const _showModalDialog_1 = Symbol('_showModalDialog_1'); 8607 const _showModalDialog_1 = Symbol('_showModalDialog_1');
8608 const _showModalDialog_2 = Symbol('_showModalDialog_2'); 8608 const _showModalDialog_2 = Symbol('_showModalDialog_2');
8609 const _showModalDialog_3 = Symbol('_showModalDialog_3'); 8609 const _showModalDialog_3 = Symbol('_showModalDialog_3');
8610 const _stop_1 = Symbol('_stop_1'); 8610 const _stop_1 = Symbol('_stop_1');
8611 class Window extends EventTarget { 8611 class Window extends EventTarget {
8612 get animationFrame() { 8612 get animationFrame() {
8613 let completer = async.Completer$(core.num).sync(); 8613 let completer = $async.Completer$(core.num).sync();
8614 this.requestAnimationFrame(dart.fn(time => { 8614 this.requestAnimationFrame(dart.fn(time => {
8615 completer.complete(time); 8615 completer.complete(time);
8616 }, dart.void, [core.num])); 8616 }, dart.void, [core.num]));
8617 return completer.future; 8617 return completer.future;
8618 } 8618 }
8619 get document() { 8619 get document() {
8620 return dart.as(wrap_jso(this.raw.document), Document); 8620 return dart.as(wrap_jso(this.raw.document), Document);
8621 } 8621 }
8622 [_open2](url, name) { 8622 [_open2](url, name) {
8623 return dart.as(wrap_jso(this.raw.open(url, name)), WindowBase); 8623 return dart.as(wrap_jso(this.raw.open(url, name)), WindowBase);
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
10221 let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false; 10221 let useCapture = opts && 'useCapture' in opts ? opts.useCapture : false;
10222 return new (_ElementListEventStreamImpl$(T))(dart.as(e, core.Iterable$(E lement)), this[_eventType], useCapture); 10222 return new (_ElementListEventStreamImpl$(T))(dart.as(e, core.Iterable$(E lement)), this[_eventType], useCapture);
10223 } 10223 }
10224 getEventType(target) { 10224 getEventType(target) {
10225 return this[_eventType]; 10225 return this[_eventType];
10226 } 10226 }
10227 } 10227 }
10228 dart.setSignature(EventStreamProvider, { 10228 dart.setSignature(EventStreamProvider, {
10229 constructors: () => ({EventStreamProvider: [EventStreamProvider$(T), [core .String]]}), 10229 constructors: () => ({EventStreamProvider: [EventStreamProvider$(T), [core .String]]}),
10230 methods: () => ({ 10230 methods: () => ({
10231 forTarget: [async.Stream$(T), [EventTarget], {useCapture: core.bool}], 10231 forTarget: [$async.Stream$(T), [EventTarget], {useCapture: core.bool}],
10232 forElement: [ElementStream$(T), [Element], {useCapture: core.bool}], 10232 forElement: [ElementStream$(T), [Element], {useCapture: core.bool}],
10233 [_forElementList]: [ElementStream$(T), [ElementList], {useCapture: core. bool}], 10233 [_forElementList]: [ElementStream$(T), [ElementList], {useCapture: core. bool}],
10234 getEventType: [core.String, [EventTarget]] 10234 getEventType: [core.String, [EventTarget]]
10235 }) 10235 })
10236 }); 10236 });
10237 return EventStreamProvider; 10237 return EventStreamProvider;
10238 }); 10238 });
10239 let EventStreamProvider = EventStreamProvider$(); 10239 let EventStreamProvider = EventStreamProvider$();
10240 const ElementStream$ = dart.generic(function(T) { 10240 const ElementStream$ = dart.generic(function(T) {
10241 class ElementStream extends core.Object {} 10241 class ElementStream extends core.Object {}
10242 ElementStream[dart.implements] = () => [async.Stream$(T)]; 10242 ElementStream[dart.implements] = () => [$async.Stream$(T)];
10243 return ElementStream; 10243 return ElementStream;
10244 }); 10244 });
10245 let ElementStream = ElementStream$(); 10245 let ElementStream = ElementStream$();
10246 const _target = Symbol('_target'); 10246 const _target = Symbol('_target');
10247 const _useCapture = Symbol('_useCapture'); 10247 const _useCapture = Symbol('_useCapture');
10248 const _EventStream$ = dart.generic(function(T) { 10248 const _EventStream$ = dart.generic(function(T) {
10249 class _EventStream extends async.Stream$(T) { 10249 class _EventStream extends $async.Stream$(T) {
10250 _EventStream(target, eventType, useCapture) { 10250 _EventStream(target, eventType, useCapture) {
10251 this[_target] = target; 10251 this[_target] = target;
10252 this[_eventType] = eventType; 10252 this[_eventType] = eventType;
10253 this[_useCapture] = useCapture; 10253 this[_useCapture] = useCapture;
10254 super.Stream(); 10254 super.Stream();
10255 } 10255 }
10256 asBroadcastStream(opts) { 10256 asBroadcastStream(opts) {
10257 let onListen = opts && 'onListen' in opts ? opts.onListen : null; 10257 let onListen = opts && 'onListen' in opts ? opts.onListen : null;
10258 dart.as(onListen, dart.functionType(dart.void, [async.StreamSubscription $(T)])); 10258 dart.as(onListen, dart.functionType(dart.void, [$async.StreamSubscriptio n$(T)]));
10259 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; 10259 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null;
10260 dart.as(onCancel, dart.functionType(dart.void, [async.StreamSubscription $(T)])); 10260 dart.as(onCancel, dart.functionType(dart.void, [$async.StreamSubscriptio n$(T)]));
10261 return this; 10261 return this;
10262 } 10262 }
10263 get isBroadcast() { 10263 get isBroadcast() {
10264 return true; 10264 return true;
10265 } 10265 }
10266 listen(onData, opts) { 10266 listen(onData, opts) {
10267 dart.as(onData, dart.functionType(dart.void, [T])); 10267 dart.as(onData, dart.functionType(dart.void, [T]));
10268 let onError = opts && 'onError' in opts ? opts.onError : null; 10268 let onError = opts && 'onError' in opts ? opts.onError : null;
10269 let onDone = opts && 'onDone' in opts ? opts.onDone : null; 10269 let onDone = opts && 'onDone' in opts ? opts.onDone : null;
10270 dart.as(onDone, dart.functionType(dart.void, [])); 10270 dart.as(onDone, dart.functionType(dart.void, []));
10271 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 10271 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
10272 return new (_EventStreamSubscription$(T))(this[_target], this[_eventType ], onData, this[_useCapture]); 10272 return new (_EventStreamSubscription$(T))(this[_target], this[_eventType ], onData, this[_useCapture]);
10273 } 10273 }
10274 } 10274 }
10275 dart.setSignature(_EventStream, { 10275 dart.setSignature(_EventStream, {
10276 constructors: () => ({_EventStream: [_EventStream$(T), [EventTarget, core. String, core.bool]]}), 10276 constructors: () => ({_EventStream: [_EventStream$(T), [EventTarget, core. String, core.bool]]}),
10277 methods: () => ({ 10277 methods: () => ({
10278 asBroadcastStream: [async.Stream$(T), [], {onListen: dart.functionType(d art.void, [async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.void , [async.StreamSubscription$(T)])}], 10278 asBroadcastStream: [$async.Stream$(T), [], {onListen: dart.functionType( dart.void, [$async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.vo id, [$async.StreamSubscription$(T)])}],
10279 listen: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T] )], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnE rror: core.bool}] 10279 listen: [$async.StreamSubscription$(T), [dart.functionType(dart.void, [T ])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOn Error: core.bool}]
10280 }) 10280 })
10281 }); 10281 });
10282 return _EventStream; 10282 return _EventStream;
10283 }); 10283 });
10284 let _EventStream = _EventStream$(); 10284 let _EventStream = _EventStream$();
10285 const _ElementEventStreamImpl$ = dart.generic(function(T) { 10285 const _ElementEventStreamImpl$ = dart.generic(function(T) {
10286 class _ElementEventStreamImpl extends _EventStream$(T) { 10286 class _ElementEventStreamImpl extends _EventStream$(T) {
10287 _ElementEventStreamImpl(target, eventType, useCapture) { 10287 _ElementEventStreamImpl(target, eventType, useCapture) {
10288 super._EventStream(dart.as(target, EventTarget), dart.as(eventType, core .String), dart.as(useCapture, core.bool)); 10288 super._EventStream(dart.as(target, EventTarget), dart.as(eventType, core .String), dart.as(useCapture, core.bool));
10289 } 10289 }
10290 matches(selector) { 10290 matches(selector) {
10291 return dart.as(this.where(dart.fn(event => dart.as(dart.dcall(event.targ et.matchesWithAncestors, selector), core.bool), core.bool, [T])).map(dart.fn(e = > { 10291 return dart.as(this.where(dart.fn(event => dart.as(dart.dcall(event.targ et.matchesWithAncestors, selector), core.bool), core.bool, [T])).map(dart.fn(e = > {
10292 dart.as(e, T); 10292 dart.as(e, T);
10293 e[_selector] = selector; 10293 e[_selector] = selector;
10294 return e; 10294 return e;
10295 }, dart.dynamic, [T])), async.Stream$(T)); 10295 }, dart.dynamic, [T])), $async.Stream$(T));
10296 } 10296 }
10297 capture(onData) { 10297 capture(onData) {
10298 dart.as(onData, dart.functionType(dart.void, [T])); 10298 dart.as(onData, dart.functionType(dart.void, [T]));
10299 return new (_EventStreamSubscription$(T))(this[_target], this[_eventType ], onData, true); 10299 return new (_EventStreamSubscription$(T))(this[_target], this[_eventType ], onData, true);
10300 } 10300 }
10301 } 10301 }
10302 _ElementEventStreamImpl[dart.implements] = () => [ElementStream$(T)]; 10302 _ElementEventStreamImpl[dart.implements] = () => [ElementStream$(T)];
10303 dart.setSignature(_ElementEventStreamImpl, { 10303 dart.setSignature(_ElementEventStreamImpl, {
10304 constructors: () => ({_ElementEventStreamImpl: [_ElementEventStreamImpl$(T ), [dart.dynamic, dart.dynamic, dart.dynamic]]}), 10304 constructors: () => ({_ElementEventStreamImpl: [_ElementEventStreamImpl$(T ), [dart.dynamic, dart.dynamic, dart.dynamic]]}),
10305 methods: () => ({ 10305 methods: () => ({
10306 matches: [async.Stream$(T), [core.String]], 10306 matches: [$async.Stream$(T), [core.String]],
10307 capture: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T ])]] 10307 capture: [$async.StreamSubscription$(T), [dart.functionType(dart.void, [ T])]]
10308 }) 10308 })
10309 }); 10309 });
10310 return _ElementEventStreamImpl; 10310 return _ElementEventStreamImpl;
10311 }); 10311 });
10312 let _ElementEventStreamImpl = _ElementEventStreamImpl$(); 10312 let _ElementEventStreamImpl = _ElementEventStreamImpl$();
10313 const _targetList = Symbol('_targetList'); 10313 const _targetList = Symbol('_targetList');
10314 const _ElementListEventStreamImpl$ = dart.generic(function(T) { 10314 const _ElementListEventStreamImpl$ = dart.generic(function(T) {
10315 class _ElementListEventStreamImpl extends async.Stream$(T) { 10315 class _ElementListEventStreamImpl extends $async.Stream$(T) {
10316 _ElementListEventStreamImpl(targetList, eventType, useCapture) { 10316 _ElementListEventStreamImpl(targetList, eventType, useCapture) {
10317 this[_targetList] = targetList; 10317 this[_targetList] = targetList;
10318 this[_eventType] = eventType; 10318 this[_eventType] = eventType;
10319 this[_useCapture] = useCapture; 10319 this[_useCapture] = useCapture;
10320 super.Stream(); 10320 super.Stream();
10321 } 10321 }
10322 matches(selector) { 10322 matches(selector) {
10323 return dart.as(this.where(dart.fn(event => dart.as(dart.dcall(event.targ et.matchesWithAncestors, selector), core.bool), core.bool, [T])).map(dart.fn(e = > { 10323 return dart.as(this.where(dart.fn(event => dart.as(dart.dcall(event.targ et.matchesWithAncestors, selector), core.bool), core.bool, [T])).map(dart.fn(e = > {
10324 dart.as(e, T); 10324 dart.as(e, T);
10325 e[_selector] = selector; 10325 e[_selector] = selector;
10326 return e; 10326 return e;
10327 }, dart.dynamic, [T])), async.Stream$(T)); 10327 }, dart.dynamic, [T])), $async.Stream$(T));
10328 } 10328 }
10329 listen(onData, opts) { 10329 listen(onData, opts) {
10330 dart.as(onData, dart.functionType(dart.void, [T])); 10330 dart.as(onData, dart.functionType(dart.void, [T]));
10331 let onError = opts && 'onError' in opts ? opts.onError : null; 10331 let onError = opts && 'onError' in opts ? opts.onError : null;
10332 let onDone = opts && 'onDone' in opts ? opts.onDone : null; 10332 let onDone = opts && 'onDone' in opts ? opts.onDone : null;
10333 dart.as(onDone, dart.functionType(dart.void, [])); 10333 dart.as(onDone, dart.functionType(dart.void, []));
10334 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 10334 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
10335 let pool = new _StreamPool.broadcast(); 10335 let pool = new _StreamPool.broadcast();
10336 for (let target of this[_targetList]) { 10336 for (let target of this[_targetList]) {
10337 pool.add(new _EventStream(target, this[_eventType], this[_useCapture]) ); 10337 pool.add(new _EventStream(target, this[_eventType], this[_useCapture]) );
10338 } 10338 }
10339 return dart.as(pool.stream.listen(onData, {onError: onError, onDone: onD one, cancelOnError: cancelOnError}), async.StreamSubscription$(T)); 10339 return dart.as(pool.stream.listen(onData, {onError: onError, onDone: onD one, cancelOnError: cancelOnError}), $async.StreamSubscription$(T));
10340 } 10340 }
10341 capture(onData) { 10341 capture(onData) {
10342 dart.as(onData, dart.functionType(dart.void, [T])); 10342 dart.as(onData, dart.functionType(dart.void, [T]));
10343 let pool = new _StreamPool.broadcast(); 10343 let pool = new _StreamPool.broadcast();
10344 for (let target of this[_targetList]) { 10344 for (let target of this[_targetList]) {
10345 pool.add(new _EventStream(target, this[_eventType], true)); 10345 pool.add(new _EventStream(target, this[_eventType], true));
10346 } 10346 }
10347 return dart.as(pool.stream.listen(onData), async.StreamSubscription$(T)) ; 10347 return dart.as(pool.stream.listen(onData), $async.StreamSubscription$(T) );
10348 } 10348 }
10349 asBroadcastStream(opts) { 10349 asBroadcastStream(opts) {
10350 let onListen = opts && 'onListen' in opts ? opts.onListen : null; 10350 let onListen = opts && 'onListen' in opts ? opts.onListen : null;
10351 dart.as(onListen, dart.functionType(dart.void, [async.StreamSubscription $(T)])); 10351 dart.as(onListen, dart.functionType(dart.void, [$async.StreamSubscriptio n$(T)]));
10352 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; 10352 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null;
10353 dart.as(onCancel, dart.functionType(dart.void, [async.StreamSubscription $(T)])); 10353 dart.as(onCancel, dart.functionType(dart.void, [$async.StreamSubscriptio n$(T)]));
10354 return this; 10354 return this;
10355 } 10355 }
10356 get isBroadcast() { 10356 get isBroadcast() {
10357 return true; 10357 return true;
10358 } 10358 }
10359 } 10359 }
10360 _ElementListEventStreamImpl[dart.implements] = () => [ElementStream$(T)]; 10360 _ElementListEventStreamImpl[dart.implements] = () => [ElementStream$(T)];
10361 dart.setSignature(_ElementListEventStreamImpl, { 10361 dart.setSignature(_ElementListEventStreamImpl, {
10362 constructors: () => ({_ElementListEventStreamImpl: [_ElementListEventStrea mImpl$(T), [core.Iterable$(Element), core.String, core.bool]]}), 10362 constructors: () => ({_ElementListEventStreamImpl: [_ElementListEventStrea mImpl$(T), [core.Iterable$(Element), core.String, core.bool]]}),
10363 methods: () => ({ 10363 methods: () => ({
10364 matches: [async.Stream$(T), [core.String]], 10364 matches: [$async.Stream$(T), [core.String]],
10365 listen: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T] )], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnE rror: core.bool}], 10365 listen: [$async.StreamSubscription$(T), [dart.functionType(dart.void, [T ])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOn Error: core.bool}],
10366 capture: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T ])]], 10366 capture: [$async.StreamSubscription$(T), [dart.functionType(dart.void, [ T])]],
10367 asBroadcastStream: [async.Stream$(T), [], {onListen: dart.functionType(d art.void, [async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.void , [async.StreamSubscription$(T)])}] 10367 asBroadcastStream: [$async.Stream$(T), [], {onListen: dart.functionType( dart.void, [$async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.vo id, [$async.StreamSubscription$(T)])}]
10368 }) 10368 })
10369 }); 10369 });
10370 return _ElementListEventStreamImpl; 10370 return _ElementListEventStreamImpl;
10371 }); 10371 });
10372 let _ElementListEventStreamImpl = _ElementListEventStreamImpl$(); 10372 let _ElementListEventStreamImpl = _ElementListEventStreamImpl$();
10373 const _onData = Symbol('_onData'); 10373 const _onData = Symbol('_onData');
10374 const _pauseCount = Symbol('_pauseCount'); 10374 const _pauseCount = Symbol('_pauseCount');
10375 const _tryResume = Symbol('_tryResume'); 10375 const _tryResume = Symbol('_tryResume');
10376 const _canceled = Symbol('_canceled'); 10376 const _canceled = Symbol('_canceled');
10377 const _unlisten = Symbol('_unlisten'); 10377 const _unlisten = Symbol('_unlisten');
10378 const _EventStreamSubscription$ = dart.generic(function(T) { 10378 const _EventStreamSubscription$ = dart.generic(function(T) {
10379 class _EventStreamSubscription extends async.StreamSubscription$(T) { 10379 class _EventStreamSubscription extends $async.StreamSubscription$(T) {
10380 _EventStreamSubscription(target, eventType, onData, useCapture) { 10380 _EventStreamSubscription(target, eventType, onData, useCapture) {
10381 this[_target] = target; 10381 this[_target] = target;
10382 this[_eventType] = eventType; 10382 this[_eventType] = eventType;
10383 this[_useCapture] = useCapture; 10383 this[_useCapture] = useCapture;
10384 this[_onData] = _wrapZone(dart.as(onData, __CastType2)); 10384 this[_onData] = _wrapZone(dart.as(onData, __CastType2));
10385 this[_pauseCount] = 0; 10385 this[_pauseCount] = 0;
10386 this[_tryResume](); 10386 this[_tryResume]();
10387 } 10387 }
10388 cancel() { 10388 cancel() {
10389 if (dart.notNull(this[_canceled])) return null; 10389 if (dart.notNull(this[_canceled])) return null;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
10430 this[_target].addEventListener(this[_eventType], dart.as(this[_onData] , EventListener), this[_useCapture]); 10430 this[_target].addEventListener(this[_eventType], dart.as(this[_onData] , EventListener), this[_useCapture]);
10431 } 10431 }
10432 } 10432 }
10433 [_unlisten]() { 10433 [_unlisten]() {
10434 if (this[_onData] != null) { 10434 if (this[_onData] != null) {
10435 this[_target].removeEventListener(this[_eventType], dart.as(this[_onDa ta], EventListener), this[_useCapture]); 10435 this[_target].removeEventListener(this[_eventType], dart.as(this[_onDa ta], EventListener), this[_useCapture]);
10436 } 10436 }
10437 } 10437 }
10438 asFuture(futureValue) { 10438 asFuture(futureValue) {
10439 if (futureValue === void 0) futureValue = null; 10439 if (futureValue === void 0) futureValue = null;
10440 let completer = async.Completer.new(); 10440 let completer = $async.Completer.new();
10441 return completer.future; 10441 return completer.future;
10442 } 10442 }
10443 } 10443 }
10444 dart.setSignature(_EventStreamSubscription, { 10444 dart.setSignature(_EventStreamSubscription, {
10445 constructors: () => ({_EventStreamSubscription: [_EventStreamSubscription$ (T), [EventTarget, core.String, dart.dynamic, core.bool]]}), 10445 constructors: () => ({_EventStreamSubscription: [_EventStreamSubscription$ (T), [EventTarget, core.String, dart.dynamic, core.bool]]}),
10446 methods: () => ({ 10446 methods: () => ({
10447 cancel: [async.Future, []], 10447 cancel: [$async.Future, []],
10448 onData: [dart.void, [dart.functionType(dart.void, [T])]], 10448 onData: [dart.void, [dart.functionType(dart.void, [T])]],
10449 onError: [dart.void, [core.Function]], 10449 onError: [dart.void, [core.Function]],
10450 onDone: [dart.void, [dart.functionType(dart.void, [])]], 10450 onDone: [dart.void, [dart.functionType(dart.void, [])]],
10451 pause: [dart.void, [], [async.Future]], 10451 pause: [dart.void, [], [$async.Future]],
10452 resume: [dart.void, []], 10452 resume: [dart.void, []],
10453 [_tryResume]: [dart.void, []], 10453 [_tryResume]: [dart.void, []],
10454 [_unlisten]: [dart.void, []], 10454 [_unlisten]: [dart.void, []],
10455 asFuture: [async.Future, [], [dart.dynamic]] 10455 asFuture: [$async.Future, [], [dart.dynamic]]
10456 }) 10456 })
10457 }); 10457 });
10458 return _EventStreamSubscription; 10458 return _EventStreamSubscription;
10459 }); 10459 });
10460 let _EventStreamSubscription = _EventStreamSubscription$(); 10460 let _EventStreamSubscription = _EventStreamSubscription$();
10461 const CustomStream$ = dart.generic(function(T) { 10461 const CustomStream$ = dart.generic(function(T) {
10462 class CustomStream extends core.Object {} 10462 class CustomStream extends core.Object {}
10463 CustomStream[dart.implements] = () => [async.Stream$(T)]; 10463 CustomStream[dart.implements] = () => [$async.Stream$(T)];
10464 return CustomStream; 10464 return CustomStream;
10465 }); 10465 });
10466 let CustomStream = CustomStream$(); 10466 let CustomStream = CustomStream$();
10467 const _streamController = Symbol('_streamController'); 10467 const _streamController = Symbol('_streamController');
10468 const _type = Symbol('_type'); 10468 const _type = Symbol('_type');
10469 const _CustomEventStreamImpl$ = dart.generic(function(T) { 10469 const _CustomEventStreamImpl$ = dart.generic(function(T) {
10470 class _CustomEventStreamImpl extends async.Stream$(T) { 10470 class _CustomEventStreamImpl extends $async.Stream$(T) {
10471 _CustomEventStreamImpl(type) { 10471 _CustomEventStreamImpl(type) {
10472 this[_streamController] = null; 10472 this[_streamController] = null;
10473 this[_type] = null; 10473 this[_type] = null;
10474 super.Stream(); 10474 super.Stream();
10475 this[_type] = type; 10475 this[_type] = type;
10476 this[_streamController] = async.StreamController$(T).broadcast({sync: tr ue}); 10476 this[_streamController] = $async.StreamController$(T).broadcast({sync: t rue});
10477 } 10477 }
10478 listen(onData, opts) { 10478 listen(onData, opts) {
10479 dart.as(onData, dart.functionType(dart.void, [T])); 10479 dart.as(onData, dart.functionType(dart.void, [T]));
10480 let onError = opts && 'onError' in opts ? opts.onError : null; 10480 let onError = opts && 'onError' in opts ? opts.onError : null;
10481 let onDone = opts && 'onDone' in opts ? opts.onDone : null; 10481 let onDone = opts && 'onDone' in opts ? opts.onDone : null;
10482 dart.as(onDone, dart.functionType(dart.void, [])); 10482 dart.as(onDone, dart.functionType(dart.void, []));
10483 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null; 10483 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError : null;
10484 return this[_streamController].stream.listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError}); 10484 return this[_streamController].stream.listen(onData, {onError: onError, onDone: onDone, cancelOnError: cancelOnError});
10485 } 10485 }
10486 asBroadcastStream(opts) { 10486 asBroadcastStream(opts) {
10487 let onListen = opts && 'onListen' in opts ? opts.onListen : null; 10487 let onListen = opts && 'onListen' in opts ? opts.onListen : null;
10488 dart.as(onListen, dart.functionType(dart.void, [async.StreamSubscription $(T)])); 10488 dart.as(onListen, dart.functionType(dart.void, [$async.StreamSubscriptio n$(T)]));
10489 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; 10489 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null;
10490 dart.as(onCancel, dart.functionType(dart.void, [async.StreamSubscription $(T)])); 10490 dart.as(onCancel, dart.functionType(dart.void, [$async.StreamSubscriptio n$(T)]));
10491 return this[_streamController].stream; 10491 return this[_streamController].stream;
10492 } 10492 }
10493 get isBroadcast() { 10493 get isBroadcast() {
10494 return true; 10494 return true;
10495 } 10495 }
10496 add(event) { 10496 add(event) {
10497 dart.as(event, T); 10497 dart.as(event, T);
10498 if (event.type == this[_type]) this[_streamController].add(event); 10498 if (event.type == this[_type]) this[_streamController].add(event);
10499 } 10499 }
10500 } 10500 }
10501 _CustomEventStreamImpl[dart.implements] = () => [CustomStream$(T)]; 10501 _CustomEventStreamImpl[dart.implements] = () => [CustomStream$(T)];
10502 dart.setSignature(_CustomEventStreamImpl, { 10502 dart.setSignature(_CustomEventStreamImpl, {
10503 constructors: () => ({_CustomEventStreamImpl: [_CustomEventStreamImpl$(T), [core.String]]}), 10503 constructors: () => ({_CustomEventStreamImpl: [_CustomEventStreamImpl$(T), [core.String]]}),
10504 methods: () => ({ 10504 methods: () => ({
10505 listen: [async.StreamSubscription$(T), [dart.functionType(dart.void, [T] )], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOnE rror: core.bool}], 10505 listen: [$async.StreamSubscription$(T), [dart.functionType(dart.void, [T ])], {onError: core.Function, onDone: dart.functionType(dart.void, []), cancelOn Error: core.bool}],
10506 asBroadcastStream: [async.Stream$(T), [], {onListen: dart.functionType(d art.void, [async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.void , [async.StreamSubscription$(T)])}], 10506 asBroadcastStream: [$async.Stream$(T), [], {onListen: dart.functionType( dart.void, [$async.StreamSubscription$(T)]), onCancel: dart.functionType(dart.vo id, [$async.StreamSubscription$(T)])}],
10507 add: [dart.void, [T]] 10507 add: [dart.void, [T]]
10508 }) 10508 })
10509 }); 10509 });
10510 return _CustomEventStreamImpl; 10510 return _CustomEventStreamImpl;
10511 }); 10511 });
10512 let _CustomEventStreamImpl = _CustomEventStreamImpl$(); 10512 let _CustomEventStreamImpl = _CustomEventStreamImpl$();
10513 class _WrappedEvent extends core.Object { 10513 class _WrappedEvent extends core.Object {
10514 _WrappedEvent(wrapped) { 10514 _WrappedEvent(wrapped) {
10515 this.wrapped = wrapped; 10515 this.wrapped = wrapped;
10516 this[_selector] = null; 10516 this[_selector] = null;
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
10828 _CustomKeyEventStreamImpl[dart.implements] = () => [CustomStream$(KeyEvent)]; 10828 _CustomKeyEventStreamImpl[dart.implements] = () => [CustomStream$(KeyEvent)];
10829 dart.setSignature(_CustomKeyEventStreamImpl, { 10829 dart.setSignature(_CustomKeyEventStreamImpl, {
10830 constructors: () => ({_CustomKeyEventStreamImpl: [_CustomKeyEventStreamImpl, [core.String]]}), 10830 constructors: () => ({_CustomKeyEventStreamImpl: [_CustomKeyEventStreamImpl, [core.String]]}),
10831 methods: () => ({add: [dart.void, [KeyEvent]]}) 10831 methods: () => ({add: [dart.void, [KeyEvent]]})
10832 }); 10832 });
10833 const _subscriptions = Symbol('_subscriptions'); 10833 const _subscriptions = Symbol('_subscriptions');
10834 const _controller = Symbol('_controller'); 10834 const _controller = Symbol('_controller');
10835 const _StreamPool$ = dart.generic(function(T) { 10835 const _StreamPool$ = dart.generic(function(T) {
10836 class _StreamPool extends core.Object { 10836 class _StreamPool extends core.Object {
10837 broadcast() { 10837 broadcast() {
10838 this[_subscriptions] = core.Map$(async.Stream$(T), async.StreamSubscript ion$(T)).new(); 10838 this[_subscriptions] = core.Map$($async.Stream$(T), $async.StreamSubscri ption$(T)).new();
10839 this[_controller] = null; 10839 this[_controller] = null;
10840 this[_controller] = async.StreamController$(T).broadcast({sync: true, on Cancel: dart.bind(this, 'close')}); 10840 this[_controller] = $async.StreamController$(T).broadcast({sync: true, o nCancel: dart.bind(this, 'close')});
10841 } 10841 }
10842 get stream() { 10842 get stream() {
10843 return this[_controller].stream; 10843 return this[_controller].stream;
10844 } 10844 }
10845 add(stream) { 10845 add(stream) {
10846 dart.as(stream, async.Stream$(T)); 10846 dart.as(stream, $async.Stream$(T));
10847 if (dart.notNull(this[_subscriptions].containsKey(stream))) return; 10847 if (dart.notNull(this[_subscriptions].containsKey(stream))) return;
10848 this[_subscriptions].set(stream, stream.listen(dart.bind(this[_controlle r], 'add'), {onError: dart.bind(this[_controller], 'addError'), onDone: dart.fn( (() => this.remove(stream)).bind(this), dart.void, [])})); 10848 this[_subscriptions].set(stream, stream.listen(dart.bind(this[_controlle r], 'add'), {onError: dart.bind(this[_controller], 'addError'), onDone: dart.fn( (() => this.remove(stream)).bind(this), dart.void, [])}));
10849 } 10849 }
10850 remove(stream) { 10850 remove(stream) {
10851 dart.as(stream, async.Stream$(T)); 10851 dart.as(stream, $async.Stream$(T));
10852 let subscription = this[_subscriptions].remove(stream); 10852 let subscription = this[_subscriptions].remove(stream);
10853 if (subscription != null) subscription.cancel(); 10853 if (subscription != null) subscription.cancel();
10854 } 10854 }
10855 close() { 10855 close() {
10856 for (let subscription of this[_subscriptions].values) { 10856 for (let subscription of this[_subscriptions].values) {
10857 subscription.cancel(); 10857 subscription.cancel();
10858 } 10858 }
10859 this[_subscriptions].clear(); 10859 this[_subscriptions].clear();
10860 this[_controller].close(); 10860 this[_controller].close();
10861 } 10861 }
10862 } 10862 }
10863 dart.defineNamedConstructor(_StreamPool, 'broadcast'); 10863 dart.defineNamedConstructor(_StreamPool, 'broadcast');
10864 dart.setSignature(_StreamPool, { 10864 dart.setSignature(_StreamPool, {
10865 constructors: () => ({broadcast: [_StreamPool$(T), []]}), 10865 constructors: () => ({broadcast: [_StreamPool$(T), []]}),
10866 methods: () => ({ 10866 methods: () => ({
10867 add: [dart.void, [async.Stream$(T)]], 10867 add: [dart.void, [$async.Stream$(T)]],
10868 remove: [dart.void, [async.Stream$(T)]], 10868 remove: [dart.void, [$async.Stream$(T)]],
10869 close: [dart.void, []] 10869 close: [dart.void, []]
10870 }) 10870 })
10871 }); 10871 });
10872 return _StreamPool; 10872 return _StreamPool;
10873 }); 10873 });
10874 let _StreamPool = _StreamPool$(); 10874 let _StreamPool = _StreamPool$();
10875 const _eventTypeGetter = Symbol('_eventTypeGetter'); 10875 const _eventTypeGetter = Symbol('_eventTypeGetter');
10876 const _CustomEventStreamProvider$ = dart.generic(function(T) { 10876 const _CustomEventStreamProvider$ = dart.generic(function(T) {
10877 class _CustomEventStreamProvider extends core.Object { 10877 class _CustomEventStreamProvider extends core.Object {
10878 _CustomEventStreamProvider(eventTypeGetter) { 10878 _CustomEventStreamProvider(eventTypeGetter) {
(...skipping 15 matching lines...) Expand all
10894 return dart.as(dart.dcall(this[_eventTypeGetter], target), core.String); 10894 return dart.as(dart.dcall(this[_eventTypeGetter], target), core.String);
10895 } 10895 }
10896 get [_eventType]() { 10896 get [_eventType]() {
10897 return dart.throw(new core.UnsupportedError('Access type through getEven tType method.')); 10897 return dart.throw(new core.UnsupportedError('Access type through getEven tType method.'));
10898 } 10898 }
10899 } 10899 }
10900 _CustomEventStreamProvider[dart.implements] = () => [EventStreamProvider$(T) ]; 10900 _CustomEventStreamProvider[dart.implements] = () => [EventStreamProvider$(T) ];
10901 dart.setSignature(_CustomEventStreamProvider, { 10901 dart.setSignature(_CustomEventStreamProvider, {
10902 constructors: () => ({_CustomEventStreamProvider: [_CustomEventStreamProvi der$(T), [dart.dynamic]]}), 10902 constructors: () => ({_CustomEventStreamProvider: [_CustomEventStreamProvi der$(T), [dart.dynamic]]}),
10903 methods: () => ({ 10903 methods: () => ({
10904 forTarget: [async.Stream$(T), [EventTarget], {useCapture: core.bool}], 10904 forTarget: [$async.Stream$(T), [EventTarget], {useCapture: core.bool}],
10905 forElement: [ElementStream$(T), [Element], {useCapture: core.bool}], 10905 forElement: [ElementStream$(T), [Element], {useCapture: core.bool}],
10906 [_forElementList]: [ElementStream$(T), [ElementList], {useCapture: core. bool}], 10906 [_forElementList]: [ElementStream$(T), [ElementList], {useCapture: core. bool}],
10907 getEventType: [core.String, [EventTarget]] 10907 getEventType: [core.String, [EventTarget]]
10908 }) 10908 })
10909 }); 10909 });
10910 return _CustomEventStreamProvider; 10910 return _CustomEventStreamProvider;
10911 }); 10911 });
10912 let _CustomEventStreamProvider = _CustomEventStreamProvider$(); 10912 let _CustomEventStreamProvider = _CustomEventStreamProvider$();
10913 class _Html5NodeValidator extends core.Object { 10913 class _Html5NodeValidator extends core.Object {
10914 _Html5NodeValidator(opts) { 10914 _Html5NodeValidator(opts) {
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
12351 forward: [dart.void, []], 12351 forward: [dart.void, []],
12352 go: [dart.void, [core.int]] 12352 go: [dart.void, [core.int]]
12353 }), 12353 }),
12354 statics: () => ({_createSafe: [HistoryBase, [dart.dynamic]]}), 12354 statics: () => ({_createSafe: [HistoryBase, [dart.dynamic]]}),
12355 names: ['_createSafe'] 12355 names: ['_createSafe']
12356 }); 12356 });
12357 class Platform extends core.Object {} 12357 class Platform extends core.Object {}
12358 Platform.supportsSimd = false; 12358 Platform.supportsSimd = false;
12359 dart.defineLazyProperties(Platform, { 12359 dart.defineLazyProperties(Platform, {
12360 get supportsTypedData() { 12360 get supportsTypedData() {
12361 return !!window.ArrayBuffer; 12361 return !!dart.global.ArrayBuffer;
12362 } 12362 }
12363 }); 12363 });
12364 function _wrapZone(callback) { 12364 function _wrapZone(callback) {
12365 if (dart.equals(async.Zone.current, async.Zone.ROOT)) return callback; 12365 if (dart.equals($async.Zone.current, $async.Zone.ROOT)) return callback;
12366 if (callback == null) return null; 12366 if (callback == null) return null;
12367 return async.Zone.current.bindUnaryCallback(callback, {runGuarded: true}); 12367 return $async.Zone.current.bindUnaryCallback(callback, {runGuarded: true});
12368 } 12368 }
12369 dart.fn(_wrapZone, dart.dynamic, [dart.functionType(dart.dynamic, [dart.dynami c])]); 12369 dart.fn(_wrapZone, dart.dynamic, [dart.functionType(dart.dynamic, [dart.dynami c])]);
12370 function _wrapBinaryZone(callback) { 12370 function _wrapBinaryZone(callback) {
12371 if (dart.equals(async.Zone.current, async.Zone.ROOT)) return callback; 12371 if (dart.equals($async.Zone.current, $async.Zone.ROOT)) return callback;
12372 if (callback == null) return null; 12372 if (callback == null) return null;
12373 return async.Zone.current.bindBinaryCallback(callback, {runGuarded: true}); 12373 return $async.Zone.current.bindBinaryCallback(callback, {runGuarded: true});
12374 } 12374 }
12375 dart.fn(_wrapBinaryZone, dart.dynamic, [dart.functionType(dart.dynamic, [dart. dynamic, dart.dynamic])]); 12375 dart.fn(_wrapBinaryZone, dart.dynamic, [dart.functionType(dart.dynamic, [dart. dynamic, dart.dynamic])]);
12376 function query(relativeSelectors) { 12376 function query(relativeSelectors) {
12377 return exports.document.query(relativeSelectors); 12377 return exports.document.query(relativeSelectors);
12378 } 12378 }
12379 dart.fn(query, Element, [core.String]); 12379 dart.fn(query, Element, [core.String]);
12380 function queryAll(relativeSelectors) { 12380 function queryAll(relativeSelectors) {
12381 return exports.document.queryAll(relativeSelectors); 12381 return exports.document.queryAll(relativeSelectors);
12382 } 12382 }
12383 dart.fn(queryAll, ElementList$(Element), [core.String]); 12383 dart.fn(queryAll, ElementList$(Element), [core.String]);
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
12591 dart.setSignature(_ValidatingTreeSanitizer, { 12591 dart.setSignature(_ValidatingTreeSanitizer, {
12592 constructors: () => ({_ValidatingTreeSanitizer: [_ValidatingTreeSanitizer, [ NodeValidator]]}), 12592 constructors: () => ({_ValidatingTreeSanitizer: [_ValidatingTreeSanitizer, [ NodeValidator]]}),
12593 methods: () => ({ 12593 methods: () => ({
12594 sanitizeTree: [dart.void, [Node]], 12594 sanitizeTree: [dart.void, [Node]],
12595 [_removeNode]: [dart.void, [Node, Node]], 12595 [_removeNode]: [dart.void, [Node, Node]],
12596 [_sanitizeUntrustedElement]: [dart.void, [dart.dynamic, Node]], 12596 [_sanitizeUntrustedElement]: [dart.void, [dart.dynamic, Node]],
12597 [_sanitizeElement]: [dart.void, [Element, Node, core.bool, core.String, co re.String, core.Map, core.String]], 12597 [_sanitizeElement]: [dart.void, [Element, Node, core.bool, core.String, co re.String, core.Map, core.String]],
12598 sanitizeNode: [dart.void, [Node, Node]] 12598 sanitizeNode: [dart.void, [Node, Node]]
12599 }) 12599 })
12600 }); 12600 });
12601 dart.defineLazyProperties(exports, {
12602 get window() {
12603 return dart.as(wrap_jso(dart.global), Window);
12604 }
12605 });
12601 dart.copyProperties(exports, { 12606 dart.copyProperties(exports, {
12602 get window() {
12603 return dart.as(wrap_jso(window), Window);
12604 },
12605 get document() { 12607 get document() {
12606 return dart.as(wrap_jso(document), HtmlDocument); 12608 return dart.as(wrap_jso(document), HtmlDocument);
12607 } 12609 }
12608 }); 12610 });
12609 class _EntryArray extends core.Object {} 12611 class _EntryArray extends core.Object {}
12610 _EntryArray[dart.implements] = () => [core.List$(dart.dynamic)]; 12612 _EntryArray[dart.implements] = () => [core.List$(dart.dynamic)];
12611 _EntryArray[dart.metadata] = () => [dart.const(new _js_helper.Native("EntryArr ay"))]; 12613 _EntryArray[dart.metadata] = () => [dart.const(new _js_helper.Native("EntryArr ay"))];
12612 function spawnDomUri(uri, args, message) { 12614 function spawnDomUri(uri, args, message) {
12613 dart.throw(new core.UnimplementedError()); 12615 dart.throw(new core.UnimplementedError());
12614 } 12616 }
12615 dart.fn(spawnDomUri, async.Future$(isolate.Isolate), [core.Uri, core.List$(cor e.String), dart.dynamic]); 12617 dart.fn(spawnDomUri, $async.Future$(isolate.Isolate), [core.Uri, core.List$(co re.String), dart.dynamic]);
12616 const _F1 = dart.typedef('_F1', () => dart.functionType(dart.dynamic, [dart.dy namic])); 12618 const _F1 = dart.typedef('_F1', () => dart.functionType(dart.dynamic, [dart.dy namic]));
12617 const _wrapper = Symbol("dart_wrapper"); 12619 const _wrapper = Symbol("dart_wrapper");
12618 function unwrap_jso(wrapped) { 12620 function unwrap_jso(wrapped) {
12619 if (dart.is(wrapped, DartHtmlDomObject)) { 12621 if (dart.is(wrapped, DartHtmlDomObject)) {
12620 return dart.dload(wrapped, 'raw'); 12622 return dart.dload(wrapped, 'raw');
12621 } 12623 }
12622 if (dart.is(wrapped, _F1)) { 12624 if (dart.is(wrapped, _F1)) {
12623 if (wrapped.hasOwnProperty(_wrapper)) { 12625 if (wrapped.hasOwnProperty(_wrapper)) {
12624 return wrapped[_wrapper]; 12626 return wrapped[_wrapper];
12625 } 12627 }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
12800 exports.ElementUpgrader = ElementUpgrader; 12802 exports.ElementUpgrader = ElementUpgrader;
12801 exports.NodeValidator = NodeValidator; 12803 exports.NodeValidator = NodeValidator;
12802 exports.NodeTreeSanitizer = NodeTreeSanitizer; 12804 exports.NodeTreeSanitizer = NodeTreeSanitizer;
12803 exports.UriPolicy = UriPolicy; 12805 exports.UriPolicy = UriPolicy;
12804 exports.spawnDomUri = spawnDomUri; 12806 exports.spawnDomUri = spawnDomUri;
12805 exports.unwrap_jso = unwrap_jso; 12807 exports.unwrap_jso = unwrap_jso;
12806 exports.wrap_jso = wrap_jso; 12808 exports.wrap_jso = wrap_jso;
12807 exports.createCustomUpgrader = createCustomUpgrader; 12809 exports.createCustomUpgrader = createCustomUpgrader;
12808 exports.getHtmlCreateFunction = getHtmlCreateFunction; 12810 exports.getHtmlCreateFunction = getHtmlCreateFunction;
12809 }); 12811 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698