OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
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. | |
4 | |
5 #library("dom_for_unittest"); | |
6 #native("dom_for_unittest.js"); | |
7 | |
8 class Window { | |
9 Window(); | |
10 | |
11 void postMessage(String message, String origin) { | |
12 _postMessage(message, origin); | |
13 } | |
14 | |
15 static void _postMessage(String message, String origin) native; | |
16 } | |
17 | |
18 class HTMLDocument { | |
19 HTMLDocument(); | |
20 | |
21 HTMLBodyElement get body() { return new HTMLBodyElement(); } | |
22 } | |
23 | |
24 class HTMLBodyElement { | |
25 HTMLBodyElement(); | |
26 | |
27 void set innerHTML(String html) { | |
28 _innerHTML(html); | |
29 } | |
30 | |
31 static void _innerHTML(String html) native; | |
32 } | |
33 | |
34 Window get window() { return new Window(); } | |
35 HTMLDocument get document() { return new HTMLDocument(); } | |
OLD | NEW |