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 // DO NOT EDIT - unless you are editing documentation as per: | 5 // DO NOT EDIT - unless you are editing documentation as per: |
6 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation | 6 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
7 // Auto-generated dart:html library. | 7 // Auto-generated dart:html library. |
8 | 8 |
9 /// The Dart HTML library. | 9 /// The Dart HTML library. |
10 library dart.dom.html; | 10 library dart.dom.html; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 | 59 |
60 /** | 60 /** |
61 * The top-level Window object. | 61 * The top-level Window object. |
62 */ | 62 */ |
63 Window get window => JS('Window', 'window'); | 63 Window get window => JS('Window', 'window'); |
64 | 64 |
65 /** | 65 /** |
66 * The top-level Document object. | 66 * The top-level Document object. |
67 */ | 67 */ |
68 HtmlDocument get document => JS('Document', 'document'); | 68 HtmlDocument get document => JS('HtmlDocument', 'document'); |
69 | 69 |
70 Element query(String selector) => document.query(selector); | 70 Element query(String selector) => document.query(selector); |
71 List<Element> queryAll(String selector) => document.queryAll(selector); | 71 List<Element> queryAll(String selector) => document.queryAll(selector); |
72 | 72 |
73 // Workaround for tags like <cite> that lack their own Element subclass -- | 73 // Workaround for tags like <cite> that lack their own Element subclass -- |
74 // Dart issue 1990. | 74 // Dart issue 1990. |
75 class _HTMLElement extends Element native "*HTMLElement" { | 75 class _HTMLElement extends Element native "*HTMLElement" { |
76 } | 76 } |
77 | 77 |
78 // Support for Send/ReceivePortSync. | 78 // Support for Send/ReceivePortSync. |
79 int _getNewIsolateId() { | 79 int _getNewIsolateId() { |
80 if (JS('bool', r'!window.$dart$isolate$counter')) { | 80 if (JS('bool', r'!window.$dart$isolate$counter')) { |
81 JS('void', r'window.$dart$isolate$counter = 1'); | 81 JS('void', r'window.$dart$isolate$counter = 1'); |
82 } | 82 } |
83 return JS('int', r'window.$dart$isolate$counter++'); | 83 return JS('int', r'window.$dart$isolate$counter++'); |
84 } | 84 } |
85 | 85 |
86 // Fast path to invoke JS send port. | 86 // Fast path to invoke JS send port. |
87 _callPortSync(int id, message) { | 87 _callPortSync(int id, message) { |
88 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); | 88 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); |
89 } | 89 } |
90 | 90 |
91 spawnDomFunction(f) => IsolateNatives.spawnDomFunction(f); | 91 spawnDomFunction(f) => IsolateNatives.spawnDomFunction(f); |
OLD | NEW |