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

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

Issue 1484263002: Use destructuring assignments for named parameters (#180) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « lib/runtime/dart/isolate.js ('k') | lib/runtime/dart/mirrors.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dart.defineLazyProperties(exports, { 10 dart.defineLazyProperties(exports, {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 let args = [_convertToDart(this)]; 146 let args = [_convertToDart(this)];
147 for (let arg of arguments) { 147 for (let arg of arguments) {
148 args.push(_convertToDart(arg)); 148 args.push(_convertToDart(arg));
149 } 149 }
150 return _convertToJS(f(...args)); 150 return _convertToJS(f(...args));
151 }); 151 });
152 } 152 }
153 _fromJs(jsObject) { 153 _fromJs(jsObject) {
154 super._fromJs(jsObject); 154 super._fromJs(jsObject);
155 } 155 }
156 apply(args, opts) { 156 apply(args, {thisArg = null} = {}) {
157 let thisArg = opts && 'thisArg' in opts ? opts.thisArg : null;
158 return _convertToDart(this[_jsObject].apply(_convertToJS(thisArg), args == null ? null : core.List.from(args[dartx.map](_convertToJS)))); 157 return _convertToDart(this[_jsObject].apply(_convertToJS(thisArg), args == null ? null : core.List.from(args[dartx.map](_convertToJS))));
159 } 158 }
160 } 159 }
161 dart.defineNamedConstructor(JsFunction, '_fromJs'); 160 dart.defineNamedConstructor(JsFunction, '_fromJs');
162 dart.setSignature(JsFunction, { 161 dart.setSignature(JsFunction, {
163 constructors: () => ({ 162 constructors: () => ({
164 withThis: [JsFunction, [core.Function]], 163 withThis: [JsFunction, [core.Function]],
165 _fromJs: [JsFunction, [dart.dynamic]] 164 _fromJs: [JsFunction, [dart.dynamic]]
166 }), 165 }),
167 methods: () => ({apply: [dart.dynamic, [core.List], {thisArg: dart.dynamic}] }) 166 methods: () => ({apply: [dart.dynamic, [core.List], {thisArg: dart.dynamic}] })
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 }); 420 });
422 let __CastType0 = __CastType0$(); 421 let __CastType0 = __CastType0$();
423 // Exports: 422 // Exports:
424 exports.JsObject = JsObject; 423 exports.JsObject = JsObject;
425 exports.JsFunction = JsFunction; 424 exports.JsFunction = JsFunction;
426 exports.JsArray$ = JsArray$; 425 exports.JsArray$ = JsArray$;
427 exports.JsArray = JsArray; 426 exports.JsArray = JsArray;
428 exports.allowInterop = allowInterop; 427 exports.allowInterop = allowInterop;
429 exports.allowInteropCaptureThis = allowInteropCaptureThis; 428 exports.allowInteropCaptureThis = allowInteropCaptureThis;
430 }); 429 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/isolate.js ('k') | lib/runtime/dart/mirrors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698