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

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

Issue 34613005: Revert "Converting Polymer and TemplateElement to use deprecated Node.document" (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/mdv/lib/src/template_iterator.dart ('k') | sdk/lib/html/dart2js/html_dart2js.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 // 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 * which resets the timer. For example: 122 * which resets the timer. For example:
123 * 123 *
124 * _myJob = job(_myJob, callback, const Duration(milliseconds: 100)); 124 * _myJob = job(_myJob, callback, const Duration(milliseconds: 100));
125 * 125 *
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 void polymerCreated() { 131 void polymerCreated() {
132 if (this.document.window != null || alwaysPrepare || 132 if (this.ownerDocument.window != null || alwaysPrepare ||
133 _preparingElements > 0) { 133 _preparingElements > 0) {
134 prepareElement(); 134 prepareElement();
135 } 135 }
136 } 136 }
137 137
138 void prepareElement() { 138 void prepareElement() {
139 // Dart note: get the _declaration, which also marks _elementPrepared 139 // Dart note: get the _declaration, which also marks _elementPrepared
140 _declaration = _getDeclaration(this.runtimeType); 140 _declaration = _getDeclaration(this.runtimeType);
141 // do this first so we can observe changes during initialization 141 // do this first so we can observe changes during initialization
142 observeProperties(); 142 observeProperties();
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 /** 952 /**
953 * Base class for PolymerElements deriving from HtmlElement. 953 * Base class for PolymerElements deriving from HtmlElement.
954 * 954 *
955 * See [Polymer]. 955 * See [Polymer].
956 */ 956 */
957 class PolymerElement extends HtmlElement with Polymer, Observable { 957 class PolymerElement extends HtmlElement with Polymer, Observable {
958 PolymerElement.created() : super.created() { 958 PolymerElement.created() : super.created() {
959 polymerCreated(); 959 polymerCreated();
960 } 960 }
961 } 961 }
OLDNEW
« no previous file with comments | « pkg/mdv/lib/src/template_iterator.dart ('k') | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698