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

Side by Side Diff: pkg/polymer/lib/src/boot.dart

Issue 27518006: Practically remove boot.js, adds the initialization from the Dart side of (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « pkg/polymer/lib/polymer.dart ('k') | pkg/polymer/lib/src/build/import_inliner.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) 2013, 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 /** Ported from `polymer/src/boot.js`. **/
6 part of polymer;
7
8 /** Prevent a flash of unstyled content. */
9 preventFlashOfUnstyledContent() {
10 var style = new StyleElement();
11 style.text = r'body {opacity: 0;}';
12 // Note: we use `query` and not `document.head` to make sure this code works
13 // with the shadow_dom polyfill (a limitation of the polyfill is that it can't
14 // override the definitions of document, document.head, or document.body).
15 var head = query('head');
16 head.insertBefore(style, head.firstChild);
17
18 Polymer.onReady.then((_) {
19 document.body.style.transition = 'opacity 0.3s';
20 document.body.style.opacity = '1';
21 });
22 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/polymer.dart ('k') | pkg/polymer/lib/src/build/import_inliner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698