| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_backend.native_data; | 5 library js_backend.native_data; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../elements/elements.dart' | 8 import '../elements/elements.dart' |
| 9 show | 9 show ClassElement, Element, FieldElement, FunctionElement, MemberElement; |
| 10 ClassElement, | 10 import '../elements/entities.dart'; |
| 11 Element, | |
| 12 Entity, | |
| 13 FieldElement, | |
| 14 FunctionElement, | |
| 15 MemberElement; | |
| 16 import '../native/behavior.dart' show NativeBehavior; | 11 import '../native/behavior.dart' show NativeBehavior; |
| 17 | 12 |
| 18 /// Additional element information for native classes and methods and js-interop | 13 /// Additional element information for native classes and methods and js-interop |
| 19 /// methods. | 14 /// methods. |
| 20 class NativeData { | 15 class NativeData { |
| 21 /// The JavaScript names for elements implemented via typed JavaScript | 16 /// The JavaScript names for elements implemented via typed JavaScript |
| 22 /// interop. | 17 /// interop. |
| 23 Map<Element, String> jsInteropNames = <Element, String>{}; | 18 Map<Element, String> jsInteropNames = <Element, String>{}; |
| 24 | 19 |
| 25 /// The JavaScript names for native JavaScript elements implemented. | 20 /// The JavaScript names for native JavaScript elements implemented. |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 226 } |
| 232 | 227 |
| 233 /// Apply JS$ escaping scheme to convert possible escaped Dart names into | 228 /// Apply JS$ escaping scheme to convert possible escaped Dart names into |
| 234 /// JS names. | 229 /// JS names. |
| 235 String getUnescapedJSInteropName(String name) { | 230 String getUnescapedJSInteropName(String name) { |
| 236 return name.startsWith(_jsInteropEscapePrefix) | 231 return name.startsWith(_jsInteropEscapePrefix) |
| 237 ? name.substring(_jsInteropEscapePrefix.length) | 232 ? name.substring(_jsInteropEscapePrefix.length) |
| 238 : name; | 233 : name; |
| 239 } | 234 } |
| 240 } | 235 } |
| OLD | NEW |