OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #library('js_helper'); | 5 #library('js_helper'); |
6 | 6 |
7 #import('coreimpl.dart'); | 7 #import('coreimpl.dart'); |
8 | 8 |
| 9 #source('constant_map.dart'); |
9 #source('date_helper.dart'); | 10 #source('date_helper.dart'); |
10 #source('regexp_helper.dart'); | 11 #source('regexp_helper.dart'); |
11 #source('string_helper.dart'); | 12 #source('string_helper.dart'); |
12 | 13 |
13 /** | 14 /** |
14 * Returns true if both arguments are numbers. | 15 * Returns true if both arguments are numbers. |
15 * | 16 * |
16 * If only the first argument is a number, an | 17 * If only the first argument is a number, an |
17 * [IllegalArgumentException] with the other argument is thrown. | 18 * [IllegalArgumentException] with the other argument is thrown. |
18 */ | 19 */ |
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 */ | 1362 */ |
1362 callClosure0(closure) => closure(); | 1363 callClosure0(closure) => closure(); |
1363 callClosure1(closure, arg1) => closure(arg1); | 1364 callClosure1(closure, arg1) => closure(arg1); |
1364 callClosure2(closure, arg1, arg2) => closure(arg1, arg2); | 1365 callClosure2(closure, arg1, arg2) => closure(arg1, arg2); |
1365 | 1366 |
1366 class StackTrace { | 1367 class StackTrace { |
1367 var stack; | 1368 var stack; |
1368 StackTrace(this.stack); | 1369 StackTrace(this.stack); |
1369 String toString() => stack != null ? stack : ''; | 1370 String toString() => stack != null ? stack : ''; |
1370 } | 1371 } |
| 1372 |
| 1373 bool jsHasOwnProperty(var jsObject, String property) { |
| 1374 return JS('bool', @'$0.hasOwnProperty($1)', jsObject, property); |
| 1375 } |
| 1376 |
| 1377 jsPropertyAccess(var jsObject, String property) { |
| 1378 return JS('var', @'$0[$1]', jsObject, property); |
| 1379 } |
OLD | NEW |