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

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

Issue 1649583002: allow JS builtin to be typed as needed (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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
OLDNEW
1 dart_library.library('dart/js', null, /* Imports */[ 1 dart_library.library('dart/js', null, /* Imports */[
2 'dart/_runtime', 2 'dart/_runtime',
3 'dart/core', 3 'dart/core',
4 'dart/collection', 4 'dart/collection',
5 'dart/_js_helper' 5 'dart/_js_helper'
6 ], /* Lazy imports */[ 6 ], /* Lazy imports */[
7 ], function(exports, dart, core, collection, _js_helper) { 7 ], function(exports, dart, core, collection, _js_helper) {
8 'use strict'; 8 'use strict';
9 let dartx = dart.dartx; 9 let dartx = dart.dartx;
10 const _global = dart.global; 10 const _global = dart.global;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 dart.fn(allowInterop, core.Function, [core.Function]); 383 dart.fn(allowInterop, core.Function, [core.Function]);
384 dart.defineLazyProperties(exports, { 384 dart.defineLazyProperties(exports, {
385 get _interopCaptureThisExpando() { 385 get _interopCaptureThisExpando() {
386 return new (core.Expando$(core.Function))(); 386 return new (core.Expando$(core.Function))();
387 }, 387 },
388 set _interopCaptureThisExpando(_) {} 388 set _interopCaptureThisExpando(_) {}
389 }); 389 });
390 function allowInteropCaptureThis(f) { 390 function allowInteropCaptureThis(f) {
391 let ret = exports._interopCaptureThisExpando.get(f); 391 let ret = exports._interopCaptureThisExpando.get(f);
392 if (ret == null) { 392 if (ret == null) {
393 ret = dart.as(function() { 393 ret = function() {
394 let args = [this]; 394 let args = [this];
395 for (let arg of arguments) { 395 for (let arg of arguments) {
396 args.push(arg); 396 args.push(arg);
397 } 397 }
398 return f(...args); 398 return f(...args);
399 }, core.Function); 399 };
400 exports._interopCaptureThisExpando.set(f, ret); 400 exports._interopCaptureThisExpando.set(f, ret);
401 } 401 }
402 return ret; 402 return ret;
403 } 403 }
404 dart.fn(allowInteropCaptureThis, core.Function, [core.Function]); 404 dart.fn(allowInteropCaptureThis, core.Function, [core.Function]);
405 const __CastType0$ = dart.generic(function(E) { 405 const __CastType0$ = dart.generic(function(E) {
406 const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart .dynamic, [E])); 406 const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(dart .dynamic, [E]));
407 return __CastType0; 407 return __CastType0;
408 }); 408 });
409 let __CastType0 = __CastType0$(); 409 let __CastType0 = __CastType0$();
410 // Exports: 410 // Exports:
411 exports.JsObject = JsObject; 411 exports.JsObject = JsObject;
412 exports.JsFunction = JsFunction; 412 exports.JsFunction = JsFunction;
413 exports.JsArray$ = JsArray$; 413 exports.JsArray$ = JsArray$;
414 exports.JsArray = JsArray; 414 exports.JsArray = JsArray;
415 exports.allowInterop = allowInterop; 415 exports.allowInterop = allowInterop;
416 exports.allowInteropCaptureThis = allowInteropCaptureThis; 416 exports.allowInteropCaptureThis = allowInteropCaptureThis;
417 }); 417 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698