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

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

Issue 2150313003: Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop ob… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 /// Allows interoperability with Javascript APIs. 5 /// Allows interoperability with Javascript APIs.
6 library js; 6 library js;
7 7
8 export 'dart:js' show allowInterop, allowInteropCaptureThis; 8 export 'dart:js' show allowInterop, allowInteropCaptureThis, JSNative;
9 9
10 /// A metadata annotation that indicates that a Library, Class, or member is 10 /// A metadata annotation that indicates that a Library, Class, or member is
11 /// implemented directly in JavaScript. All external members of a class or 11 /// implemented directly in JavaScript. All external members of a class or
12 /// library with this annotation implicitly have it as well. 12 /// library with this annotation implicitly have it as well.
13 /// 13 ///
14 /// Specifying [name] customizes the JavaScript name to use. By default the 14 /// Specifying [name] customizes the JavaScript name to use. By default the
15 /// dart name is used. It is not valid to specify a custom [name] for class 15 /// dart name is used. It is not valid to specify a custom [name] for class
16 /// instance members. 16 /// instance members.
17 class JS { 17 class JS {
18 final String name; 18 final String name;
19 const JS([this.name]); 19 const JS([this.name]);
20 } 20 }
21 21
22 class _Anonymous { 22 class _Anonymous {
23 const _Anonymous(); 23 const _Anonymous();
24 } 24 }
25 25
26 /// A metadata annotation that indicates that a @JS annotated class is 26 /// A metadata annotation that indicates that a @JS annotated class is
27 /// structural and does not have a known JavaScript prototype. 27 /// structural and does not have a known JavaScript prototype.
28 /// 28 ///
29 /// Factory constructors for anonymous JavaScript classes desugar to creating 29 /// Factory constructors for anonymous JavaScript classes desugar to creating
30 /// JavaScript object literals with name-value pairs corresponding to the 30 /// JavaScript object literals with name-value pairs corresponding to the
31 /// parameter names and values. 31 /// parameter names and values.
32 const _Anonymous anonymous = const _Anonymous(); 32 const _Anonymous anonymous = const _Anonymous();
OLDNEW
« no previous file with comments | « pkg/js/CHANGELOG.md ('k') | pkg/js/pubspec.yaml » ('j') | sdk/lib/js/dart2js/js_dart2js.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698