| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 * The top-level Window object. | 67 * The top-level Window object. |
| 68 */ | 68 */ |
| 69 Window get window => JS('Window', 'window'); | 69 Window get window => JS('Window', 'window'); |
| 70 | 70 |
| 71 /** | 71 /** |
| 72 * The top-level Document object. | 72 * The top-level Document object. |
| 73 */ | 73 */ |
| 74 HtmlDocument get document => JS('HtmlDocument', 'document'); | 74 HtmlDocument get document => JS('HtmlDocument', 'document'); |
| 75 | 75 |
| 76 Element query(String selector) => document.query(selector); | 76 Element query(String selector) => document.query(selector); |
| 77 List<Element> queryAll(String selector) => document.queryAll(selector); | 77 ElementList queryAll(String selector) => document.queryAll(selector); |
| 78 | 78 |
| 79 // Workaround for tags like <cite> that lack their own Element subclass -- | 79 // Workaround for tags like <cite> that lack their own Element subclass -- |
| 80 // Dart issue 1990. | 80 // Dart issue 1990. |
| 81 class _HTMLElement extends Element native "HTMLElement" { | 81 class _HTMLElement extends Element native "HTMLElement" { |
| 82 } | 82 } |
| 83 | 83 |
| 84 // Support for Send/ReceivePortSync. | 84 // Support for Send/ReceivePortSync. |
| 85 int _getNewIsolateId() { | 85 int _getNewIsolateId() { |
| 86 if (JS('bool', r'!window.$dart$isolate$counter')) { | 86 if (JS('bool', r'!window.$dart$isolate$counter')) { |
| 87 JS('void', r'window.$dart$isolate$counter = 1'); | 87 JS('void', r'window.$dart$isolate$counter = 1'); |
| 88 } | 88 } |
| 89 return JS('int', r'window.$dart$isolate$counter++'); | 89 return JS('int', r'window.$dart$isolate$counter++'); |
| 90 } | 90 } |
| 91 | 91 |
| 92 // Fast path to invoke JS send port. | 92 // Fast path to invoke JS send port. |
| 93 _callPortSync(int id, message) { | 93 _callPortSync(int id, message) { |
| 94 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); | 94 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); |
| 95 } | 95 } |
| 96 | 96 |
| 97 spawnDomFunction(Function f) => IsolateNatives.spawnDomFunction(f); | 97 spawnDomFunction(Function f) => IsolateNatives.spawnDomFunction(f); |
| OLD | NEW |