| 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 /// | 10 /// |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 /** | 87 /** |
| 88 * Root node for all content in a web page. | 88 * Root node for all content in a web page. |
| 89 */ | 89 */ |
| 90 HtmlDocument get document => JS('HtmlDocument', 'document'); | 90 HtmlDocument get document => JS('HtmlDocument', 'document'); |
| 91 | 91 |
| 92 Element query(String selector) => document.query(selector); | 92 Element query(String selector) => document.query(selector); |
| 93 ElementList queryAll(String selector) => document.queryAll(selector); | 93 ElementList queryAll(String selector) => document.queryAll(selector); |
| 94 | 94 |
| 95 // Workaround for tags like <cite> that lack their own Element subclass -- | 95 // Workaround for tags like <cite> that lack their own Element subclass -- |
| 96 // Dart issue 1990. | 96 // Dart issue 1990. |
| 97 class _HTMLElement extends Element native "HTMLElement" { | 97 class HtmlElement extends Element native "HTMLElement" { |
| 98 factory _HTMLElement() { throw new UnsupportedError("Not supported"); } | 98 factory HtmlElement() { throw new UnsupportedError("Not supported"); } |
| 99 } | 99 } |
| 100 | 100 |
| 101 // Support for Send/ReceivePortSync. | 101 // Support for Send/ReceivePortSync. |
| 102 int _getNewIsolateId() { | 102 int _getNewIsolateId() { |
| 103 if (JS('bool', r'!window.$dart$isolate$counter')) { | 103 if (JS('bool', r'!window.$dart$isolate$counter')) { |
| 104 JS('void', r'window.$dart$isolate$counter = 1'); | 104 JS('void', r'window.$dart$isolate$counter = 1'); |
| 105 } | 105 } |
| 106 return JS('int', r'window.$dart$isolate$counter++'); | 106 return JS('int', r'window.$dart$isolate$counter++'); |
| 107 } | 107 } |
| 108 | 108 |
| 109 // Fast path to invoke JS send port. | 109 // Fast path to invoke JS send port. |
| 110 _callPortSync(int id, message) { | 110 _callPortSync(int id, message) { |
| 111 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); | 111 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); |
| 112 } | 112 } |
| 113 | 113 |
| 114 Future<SendPort> spawnDomFunction(Function f) => | 114 Future<SendPort> spawnDomFunction(Function f) => |
| 115 new Future.value(IsolateNatives.spawnDomFunction(f)); | 115 new Future.value(IsolateNatives.spawnDomFunction(f)); |
| OLD | NEW |