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

Side by Side Diff: client/base/DomWrapper.dart

Issue 9382027: Move client/{base, observable, layout, touch, util, view} to samples/ui_lib . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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 | « client/base/Device.dart ('k') | client/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
(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 /**
6 * Embedded DSL for generating DOM elements.
7 */
8 class Dom {
9 static void ready(void f()) {
10 if (document.readyState == 'interactive' ||
11 document.readyState == 'complete') {
12 window.setTimeout(f, 0);
13 } else {
14 // TODO(jacobr): give this event a named property.
15 window.on.contentLoaded.add((Event e) { f(); });
16 }
17 }
18
19 /** Adds the given <style> text to the page. */
20 static void addStyle(String cssText) {
21 StyleElement style = new Element.tag('style');
22 style.type = 'text/css';
23 style.text = cssText;
24 document.head.nodes.add(style);
25 }
26 }
OLDNEW
« no previous file with comments | « client/base/Device.dart ('k') | client/base/Env.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698