| 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 class _ConsoleVariables { | 7 class _ConsoleVariables { |
| 8 Map<String, Object> _data = new Map<String, Object>(); | 8 Map<String, Object> _data = new Map<String, Object>(); |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 WindowBase get opener native "Window_opener_Getter"; | 466 WindowBase get opener native "Window_opener_Getter"; |
| 467 WindowBase get parent native "Window_parent_Getter"; | 467 WindowBase get parent native "Window_parent_Getter"; |
| 468 WindowBase get top native "Window_top_Getter"; | 468 WindowBase get top native "Window_top_Getter"; |
| 469 | 469 |
| 470 // Methods. | 470 // Methods. |
| 471 void close() native "Window_close_Callback"; | 471 void close() native "Window_close_Callback"; |
| 472 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List
messagePorts]) native "Window_postMessage_Callback"; | 472 void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List
messagePorts]) native "Window_postMessage_Callback"; |
| 473 | 473 |
| 474 // Implementation support. | 474 // Implementation support. |
| 475 String get typeName => "Window"; | 475 String get typeName => "Window"; |
| 476 |
| 477 // TODO(efortuna): Remove this method. dartbug.com/16814 |
| 478 Events get on => throw new UnsupportedError( |
| 479 'You can only attach EventListeners to your own window.'); |
| 480 // TODO(efortuna): Remove this method. dartbug.com/16814 |
| 481 void addEventListener(String type, EventListener listener, [bool useCapture]) |
| 482 => throw new UnsupportedError( |
| 483 'You can only attach EventListeners to your own window.'); |
| 484 // TODO(efortuna): Remove this method. dartbug.com/16814 |
| 485 bool dispatchEvent(Event event) => throw new UnsupportedError( |
| 486 'You can only attach EventListeners to your own window.'); |
| 487 // TODO(efortuna): Remove this method. dartbug.com/16814 |
| 488 void removeEventListener(String type, EventListener listener, |
| 489 [bool useCapture]) => throw new UnsupportedError( |
| 490 'You can only attach EventListeners to your own window.'); |
| 476 } | 491 } |
| 477 | 492 |
| 478 class _HistoryCrossFrame extends NativeFieldWrapperClass2 implements HistoryBase
{ | 493 class _HistoryCrossFrame extends NativeFieldWrapperClass2 implements HistoryBase
{ |
| 479 _HistoryCrossFrame.internal(); | 494 _HistoryCrossFrame.internal(); |
| 480 | 495 |
| 481 // Methods. | 496 // Methods. |
| 482 void back() native "History_back_Callback"; | 497 void back() native "History_back_Callback"; |
| 483 void forward() native "History_forward_Callback"; | 498 void forward() native "History_forward_Callback"; |
| 484 void go(int distance) native "History_go_Callback"; | 499 void go(int distance) native "History_go_Callback"; |
| 485 | 500 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 _scheduleImmediateHelper._schedule(callback); | 630 _scheduleImmediateHelper._schedule(callback); |
| 616 }; | 631 }; |
| 617 | 632 |
| 618 get _pureIsolateScheduleImmediateClosure => ((void callback()) => | 633 get _pureIsolateScheduleImmediateClosure => ((void callback()) => |
| 619 throw new UnimplementedError("scheduleMicrotask in background isolates " | 634 throw new UnimplementedError("scheduleMicrotask in background isolates " |
| 620 "are not supported in the browser")); | 635 "are not supported in the browser")); |
| 621 | 636 |
| 622 void _initializeCustomElement(Element e) { | 637 void _initializeCustomElement(Element e) { |
| 623 _Utils.initializeCustomElement(e); | 638 _Utils.initializeCustomElement(e); |
| 624 } | 639 } |
| OLD | NEW |