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

Side by Side Diff: ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.js

Issue 2282403005: MD WebUI: Move history-lazy-render into cr-elements (Closed)
Patch Set: Rebase Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * history-lazy-render is a simple variant of dom-if designed for lazy rendering 7 * cr-lazy-render is a simple variant of dom-if designed for lazy rendering
8 * of elements that are accessed imperatively. 8 * of elements that are accessed imperatively.
9 * Usage: 9 * Usage:
10 * <template is="history-lazy-render" id="menu"> 10 * <template is="cr-lazy-render" id="menu">
11 * <heavy-menu></heavy-menu> 11 * <heavy-menu></heavy-menu>
12 * </template> 12 * </template>
13 * 13 *
14 * this.$.menu.get().then(function(menu) { 14 * this.$.menu.get().then(function(menu) {
15 * menu.show(); 15 * menu.show();
16 * }); 16 * });
17 */ 17 */
18 18
19 /**
20 * A template instance created by Polymer.Templatizer.
21 * @constructor
22 * @extends {PolymerElement}
23 */
24 var TemplateInstance = function() {};
25
26 /** @type {Array<Element>} */
27 TemplateInstance.prototype._children;
28
29 /**
30 * @param {string} prop
31 * @param {Object} value
32 * @param {boolean} quiet
33 */
34 TemplateInstance.prototype.__setProperty = function(prop, value, quiet) {};
35
36 /**
37 * @param {string} path
38 * @param {Object} value
39 * @param {boolean} quiet
40 */
41 TemplateInstance.prototype._notifyPath = function(path, value, quiet) {};
Dan Beam 2016/09/14 20:34:39 can we push these into here? https://github.com/go
tsergeant 2016/09/15 04:58:55 I'll do you one better, and follow-up with a CL to
42
19 Polymer({ 43 Polymer({
20 is: 'history-lazy-render', 44 is: 'cr-lazy-render',
21 extends: 'template', 45 extends: 'template',
22 46
23 behaviors: [ 47 behaviors: [
24 Polymer.Templatizer 48 Polymer.Templatizer
25 ], 49 ],
26 50
27 /** @private {Promise<Element>} */ 51 /** @private {Promise<Element>} */
28 _renderPromise: null, 52 _renderPromise: null,
29 53
30 /** @private {TemplateInstance} */ 54 /** @private {TemplateInstance} */
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 110
87 /** 111 /**
88 * @param {string} path 112 * @param {string} path
89 * @param {Object} value 113 * @param {Object} value
90 */ 114 */
91 _forwardParentPath: function(path, value) { 115 _forwardParentPath: function(path, value) {
92 if (this._instance) 116 if (this._instance)
93 this._instance._notifyPath(path, value, true); 117 this._instance._notifyPath(path, value, true);
94 } 118 }
95 }); 119 });
OLDNEW
« no previous file with comments | « ui/webui/resources/cr_elements/cr_lazy_render/cr_lazy_render.html ('k') | ui/webui/resources/cr_elements_resources.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698