Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: dart/samples/ui_lib/base/DomWrapper.dart

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/samples/ui_lib/base/Device.dart ('k') | dart/samples/ui_lib/base/Env.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of base;
2
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
4 // 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
5 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
6 4
7 /** 5 /**
8 * Embedded DSL for generating DOM elements. 6 * Embedded DSL for generating DOM elements.
9 */ 7 */
10 class Dom { 8 class Dom {
11 static void ready(void f()) { 9 static void ready(void f()) {
12 if (document.readyState == 'interactive' || 10 if (document.readyState == 'interactive' ||
13 document.readyState == 'complete') { 11 document.readyState == 'complete') {
14 window.setTimeout(f, 0); 12 window.setTimeout(f, 0);
15 } else { 13 } else {
16 // TODO(jacobr): give this event a named property. 14 // TODO(jacobr): give this event a named property.
17 window.on.contentLoaded.add((Event e) { f(); }); 15 window.on.contentLoaded.add((Event e) { f(); });
18 } 16 }
19 } 17 }
20 18
21 /** Adds the given <style> text to the page. */ 19 /** Adds the given <style> text to the page. */
22 static void addStyle(String cssText) { 20 static void addStyle(String cssText) {
23 StyleElement style = new Element.tag('style'); 21 StyleElement style = new Element.tag('style');
24 style.type = 'text/css'; 22 style.type = 'text/css';
25 style.text = cssText; 23 style.text = cssText;
26 document.head.nodes.add(style); 24 document.head.nodes.add(style);
27 } 25 }
28 } 26 }
OLDNEW
« no previous file with comments | « dart/samples/ui_lib/base/Device.dart ('k') | dart/samples/ui_lib/base/Env.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698