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

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

Issue 27602002: Renaming Node.document back to Node.ownerDocument (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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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 polymer; 5 part of polymer;
6 6
7 /** 7 /**
8 * Use this annotation to publish a field as an attribute. For example: 8 * Use this annotation to publish a field as an attribute. For example:
9 * 9 *
10 * class MyPlaybackElement extends PolymerElement { 10 * class MyPlaybackElement extends PolymerElement {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 * Returns a job handle which can be used to re-register a job. 126 * Returns a job handle which can be used to re-register a job.
127 */ 127 */
128 Job job(Job job, void callback(), Duration wait) => 128 Job job(Job job, void callback(), Duration wait) =>
129 runJob(job, callback, wait); 129 runJob(job, callback, wait);
130 130
131 // TODO(jmesserly): I am not sure if we should have the 131 // TODO(jmesserly): I am not sure if we should have the
132 // created/createdCallback distinction. See post here: 132 // created/createdCallback distinction. See post here:
133 // https://groups.google.com/d/msg/polymer-dev/W0ZUpU5caIM/v5itFnvnehEJ 133 // https://groups.google.com/d/msg/polymer-dev/W0ZUpU5caIM/v5itFnvnehEJ
134 // Same issue with inserted and removed. 134 // Same issue with inserted and removed.
135 void polymerCreated() { 135 void polymerCreated() {
136 if (this.document.window != null || alwaysPrepare || 136 if (this.ownerDocument.window != null || alwaysPrepare ||
137 _preparingElements > 0) { 137 _preparingElements > 0) {
138 prepareElement(); 138 prepareElement();
139 } 139 }
140 } 140 }
141 141
142 void prepareElement() { 142 void prepareElement() {
143 // Dart note: get the _declaration, which also marks _elementPrepared 143 // Dart note: get the _declaration, which also marks _elementPrepared
144 _declaration = _getDeclaration(this.runtimeType); 144 _declaration = _getDeclaration(this.runtimeType);
145 // do this first so we can observe changes during initialization 145 // do this first so we can observe changes during initialization
146 observeProperties(); 146 observeProperties();
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 /** 940 /**
941 * Base class for PolymerElements deriving from HtmlElement. 941 * Base class for PolymerElements deriving from HtmlElement.
942 * 942 *
943 * See [Polymer]. 943 * See [Polymer].
944 */ 944 */
945 class PolymerElement extends HtmlElement with Polymer, ObservableMixin { 945 class PolymerElement extends HtmlElement with Polymer, ObservableMixin {
946 PolymerElement.created() : super.created() { 946 PolymerElement.created() : super.created() {
947 polymerCreated(); 947 polymerCreated();
948 } 948 }
949 } 949 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698