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

Side by Side Diff: sdk/lib/js/dartium/js_dartium.dart

Issue 1410403003: Switch Js to JS (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « pkg/js/lib/js.dart ('k') | tests/html/js_array_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 } 252 }
253 }); 253 });
254 } 254 }
255 } 255 }
256 256
257 _finalizeJsInterfaces() native "Js_finalizeJsInterfaces"; 257 _finalizeJsInterfaces() native "Js_finalizeJsInterfaces";
258 258
259 String _getJsName(mirrors.DeclarationMirror mirror) { 259 String _getJsName(mirrors.DeclarationMirror mirror) {
260 for (var annotation in mirror.metadata) { 260 for (var annotation in mirror.metadata) {
261 if (mirrors.MirrorSystem.getName(annotation.type.simpleName) == "Js") { 261 if (mirrors.MirrorSystem.getName(annotation.type.simpleName) == "JS") {
262 mirrors.LibraryMirror library = annotation.type.owner; 262 mirrors.LibraryMirror library = annotation.type.owner;
263 var uri = library.uri; 263 var uri = library.uri;
264 // make sure the annotation is from package://js 264 // make sure the annotation is from package://js
265 if (uri.scheme == 'package' && uri.path == 'js/js.dart') { 265 if (uri.scheme == 'package' && uri.path == 'js/js.dart') {
266 try { 266 try {
267 var name = annotation.reflectee.name; 267 var name = annotation.reflectee.name;
268 return name != null ? name : ""; 268 return name != null ? name : "";
269 } catch (e) { 269 } catch (e) {
270 } 270 }
271 } 271 }
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 return f; 1174 return f;
1175 } else { 1175 } else {
1176 var ret = _interopCaptureThisExpando[f]; 1176 var ret = _interopCaptureThisExpando[f];
1177 if (ret == null) { 1177 if (ret == null) {
1178 ret = new JsFunction.withThis(f); 1178 ret = new JsFunction.withThis(f);
1179 _interopCaptureThisExpando[f] = ret; 1179 _interopCaptureThisExpando[f] = ret;
1180 } 1180 }
1181 return ret; 1181 return ret;
1182 } 1182 }
1183 } 1183 }
OLDNEW
« no previous file with comments | « pkg/js/lib/js.dart ('k') | tests/html/js_array_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698