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

Side by Side Diff: tool/input_sdk/lib/js/dart2js/js_dart2js.dart

Issue 1909193002: Cleanup dart:indexed_db, dart:svg, and dart:js errrors. update dart:html with extra generic methods. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 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 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /** 5 /**
6 * Support for interoperating with JavaScript. 6 * Support for interoperating with JavaScript.
7 * 7 *
8 * This library provides access to JavaScript objects from Dart, allowing 8 * This library provides access to JavaScript objects from Dart, allowing
9 * Dart code to get and set properties, and call methods of JavaScript objects 9 * Dart code to get and set properties, and call methods of JavaScript objects
10 * and invoke JavaScript functions. The library takes care of converting 10 * and invoke JavaScript functions. The library takes care of converting
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 void removeRange(int start, int end) { 414 void removeRange(int start, int end) {
415 _checkRange(start, end, length); 415 _checkRange(start, end, length);
416 callMethod('splice', [start, end - start]); 416 callMethod('splice', [start, end - start]);
417 } 417 }
418 418
419 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) { 419 void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
420 _checkRange(start, end, this.length); 420 _checkRange(start, end, this.length);
421 int length = end - start; 421 int length = end - start;
422 if (length == 0) return; 422 if (length == 0) return;
423 if (skipCount < 0) throw new ArgumentError(skipCount); 423 if (skipCount < 0) throw new ArgumentError(skipCount);
424 var args = [start, length]..addAll(iterable.skip(skipCount).take(length)); 424 var args = <Object>[start, length]..addAll(iterable.skip(skipCount).take(len gth));
425 callMethod('splice', args); 425 callMethod('splice', args);
426 } 426 }
427 427
428 void sort([int compare(E a, E b)]) { 428 void sort([int compare(E a, E b)]) {
429 // Note: arr.sort(null) is a type error in FF 429 // Note: arr.sort(null) is a type error in FF
430 callMethod('sort', compare == null ? [] : [compare]); 430 callMethod('sort', compare == null ? [] : [compare]);
431 } 431 }
432 } 432 }
433 433
434 bool _isBrowserType(o) => JS('bool', 434 bool _isBrowserType(o) => JS('bool',
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 ' for (let arg of arguments) {' 550 ' for (let arg of arguments) {'
551 ' args.push(arg);' 551 ' args.push(arg);'
552 ' }' 552 ' }'
553 ' return #(...args);' 553 ' return #(...args);'
554 '}', 554 '}',
555 f); 555 f);
556 _interopCaptureThisExpando[f] = ret; 556 _interopCaptureThisExpando[f] = ret;
557 } 557 }
558 return ret; 558 return ret;
559 } 559 }
OLDNEW
« no previous file with comments | « tool/input_sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart ('k') | tool/input_sdk/lib/svg/dart2js/svg_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698