| 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 | 5 // DO NOT EDIT |
| 6 // Auto-generated dart:html library. | 6 // Auto-generated dart:html library. |
| 7 | 7 |
| 8 /// The Dart HTML library. | 8 /// The Dart HTML library. |
| 9 library dart.dom.html; | 9 library dart.dom.html; |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 HtmlDocument get document { | 73 HtmlDocument get document { |
| 74 if (_document != null) { | 74 if (_document != null) { |
| 75 return _document; | 75 return _document; |
| 76 } | 76 } |
| 77 _document = window.document; | 77 _document = window.document; |
| 78 return _document; | 78 return _document; |
| 79 } | 79 } |
| 80 | 80 |
| 81 | 81 |
| 82 Element query(String selector) => document.query(selector); | 82 Element query(String selector) => document.query(selector); |
| 83 List<Element> queryAll(String selector) => document.queryAll(selector); | 83 ElementList queryAll(String selector) => document.queryAll(selector); |
| 84 | 84 |
| 85 int _getNewIsolateId() => _Utils._getNewIsolateId(); | 85 int _getNewIsolateId() => _Utils._getNewIsolateId(); |
| 86 | 86 |
| 87 bool _callPortInitialized = false; | 87 bool _callPortInitialized = false; |
| 88 var _callPortLastResult = null; | 88 var _callPortLastResult = null; |
| 89 | 89 |
| 90 _callPortSync(num id, var message) { | 90 _callPortSync(num id, var message) { |
| 91 if (!_callPortInitialized) { | 91 if (!_callPortInitialized) { |
| 92 window.on['js-result'].listen((event) { | 92 window.on['js-result'].listen((event) { |
| 93 _callPortLastResult = json.parse(_getPortSyncEventData(event)); | 93 _callPortLastResult = json.parse(_getPortSyncEventData(event)); |
| 94 }); | 94 }); |
| 95 _callPortInitialized = true; | 95 _callPortInitialized = true; |
| 96 } | 96 } |
| 97 assert(_callPortLastResult == null); | 97 assert(_callPortLastResult == null); |
| 98 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); | 98 _dispatchEvent('js-sync-message', {'id': id, 'message': message}); |
| 99 var result = _callPortLastResult; | 99 var result = _callPortLastResult; |
| 100 _callPortLastResult = null; | 100 _callPortLastResult = null; |
| 101 return result; | 101 return result; |
| 102 } | 102 } |
| OLD | NEW |