OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 /** | |
6 * The js library allows Dart library authors to export their APIs to JavaScript | |
7 * and to define Dart interfaces for JavaScript objects. | |
8 */ | |
9 library js; | |
10 | |
11 /// A metadata annotation that indicates that a Library, Class, or member is | |
12 /// implemented directly in JavaScript. All external members of a class or | |
13 /// library with this annotation implicitly have it as well. | |
14 /// | |
15 /// Specifying [name] customizes the JavaScript name to use. By default the | |
16 /// dart name is used. It is not valid to specify a custom [name] for class | |
17 /// instance members. | |
sra1
2015/10/01 20:55:28
Comment needs examples.
Jacob
2015/10/02 20:08:16
Done.
| |
18 class Js { | |
19 final String name; | |
20 const Js([this.name]); | |
21 } | |
22 | |
23 /// A metadata annotation used to indicate that the Js object is a anonymous js | |
24 /// object. That is it is created with `new Object()`. | |
sra1
2015/10/01 20:55:28
Say why this is needed.
Add example.
Jacob
2015/10/02 20:08:16
Removed as we aren't using it yet.
| |
25 const anonymous = const _Anonymous(); | |
26 class _Anonymous { | |
27 const _Anonymous(); | |
28 } | |
OLD | NEW |