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

Side by Side Diff: third_party/polymer/v0_8/components/polymer-externs/polymer.externs.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 6 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 /** 1 /**
2 * @fileoverview Closure compiler externs for the Polymer library. 2 * @fileoverview Closure compiler externs for the Polymer library.
3 * 3 *
4 * @externs 4 * @externs
5 * @license 5 * @license
6 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 6 * Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
7 * This code may only be used under the BSD style license found at 7 * This code may only be used under the BSD style license found at
8 * http://polymer.github.io/LICENSE.txt. The complete set of authors may be 8 * http://polymer.github.io/LICENSE.txt. The complete set of authors may be
9 * found at http://polymer.github.io/AUTHORS.txt. The complete set of 9 * found at http://polymer.github.io/AUTHORS.txt. The complete set of
10 * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt. Code 10 * contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt. Code
(...skipping 10 matching lines...) Expand all
21 21
22 /** @constructor @extends {HTMLElement} */ 22 /** @constructor @extends {HTMLElement} */
23 var PolymerElement = function() {}; 23 var PolymerElement = function() {};
24 24
25 /** 25 /**
26 * A mapping from ID to element in this Polymer Element's local DOM. 26 * A mapping from ID to element in this Polymer Element's local DOM.
27 * @type {!Object} 27 * @type {!Object}
28 */ 28 */
29 PolymerElement.prototype.$; 29 PolymerElement.prototype.$;
30 30
31 /**
32 * True if the element has been attached to the DOM.
33 * @type {boolean}
34 */
35 PolymerElement.prototype.isAttached;
36
37 /**
38 * The root node of the element.
39 * @type {!Node}
40 */
41 PolymerElement.prototype.root;
42
43 /**
44 * Returns the first node in this element’s local DOM that matches selector.
45 * @param {string} selector
46 */
47 PolymerElement.prototype.$$ = function(selector) {};
48
31 /** @type {string} The Custom element tag name. */ 49 /** @type {string} The Custom element tag name. */
32 PolymerElement.prototype.is; 50 PolymerElement.prototype.is;
33 51
34 /** @type {string} The native element this element extends. */ 52 /** @type {string} The native element this element extends. */
35 PolymerElement.prototype.extends; 53 PolymerElement.prototype.extends;
36 54
37 /** 55 /**
38 * An array of objects whose properties get mixed in to this element. 56 * An array of objects whose properties get mixed in to this element.
39 * 57 *
40 * @type {!Array<!Object>|undefined} 58 * @type {!Array<!Object>|undefined}
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 * @param {string} type An event name. 130 * @param {string} type An event name.
113 * @param {Object=} detail 131 * @param {Object=} detail
114 * @param {{ 132 * @param {{
115 * bubbles: (boolean|undefined), 133 * bubbles: (boolean|undefined),
116 * cancelable: (boolean|undefined), 134 * cancelable: (boolean|undefined),
117 * node: (!HTMLElement|undefined)}=} options 135 * node: (!HTMLElement|undefined)}=} options
118 * @return {Object} event 136 * @return {Object} event
119 */ 137 */
120 PolymerElement.prototype.fire = function(type, detail, options) {}; 138 PolymerElement.prototype.fire = function(type, detail, options) {};
121 139
140 /**
141 * Toggles the named boolean class on the host element, adding the class if
142 * bool is truthy and removing it if bool is falsey. If node is specified, sets
143 * the class on node instead of the host element.
144 * @param {string} name
145 * @param {boolean} bool
146 * @param {HTMLElement=} node
147 */
148 PolymerElement.prototype.toggleClass = function(name, bool, node) {};
149
150 /**
151 * Toggles the named boolean attribute on the host element, adding the attribute
152 * if bool is truthy and removing it if bool is falsey. If node is specified,
153 * sets the attribute on node instead of the host element.
154 * @param {string} name
155 * @param {boolean} bool
156 * @param {HTMLElement=} node
157 */
158 PolymerElement.prototype.toggleAttribute = function(name, bool, node) {};
159
160 /**
161 * Moves a boolean attribute from oldNode to newNode, unsetting the attribute
162 * (if set) on oldNode and setting it on newNode.
163 * @param {string} name
164 * @param {!HTMLElement} newNode
165 * @param {!HTMLElement} oldNode
166 */
167 PolymerElement.prototype.attributeFollows = function(name, newNode, oldNode) {};
168
169 /**
170 * @param {!Function} method
171 * @param {number=} wait
172 * @return {number} A handle which can be used to cancel the job.
173 */
174 PolymerElement.prototype.async = function(method, wait) {};
175
176 /**
177 * @param {number} handle
178 */
179 PolymerElement.prototype.cancelAsync = function(handle) {};
180
181 /**
182 * Call debounce to collapse multiple requests for a named task into one
183 * invocation, which is made after the wait time has elapsed with no new
184 * request. If no wait time is given, the callback is called at microtask timing
185 * (guaranteed to be before paint).
186 * @param {string} jobName
187 * @param {!Function} callback
188 * @param {number=} wait
189 */
190 PolymerElement.prototype.debounce = function(jobName, callback, wait) {};
191
192 /**
193 * Cancels an active debouncer without calling the callback.
194 * @param {string} jobName
195 */
196 PolymerElement.prototype.cancelDebouncer = function(jobName) {};
197
198 /**
199 * Calls the debounced callback immediately and cancels the debouncer.
200 * @param {string} jobName
201 */
202 PolymerElement.prototype.flushDebouncer = function(jobName) {};
203
204 /**
205 * @param {string} jobName
206 * @return {boolean} True if the named debounce task is waiting to run.
207 */
208 PolymerElement.prototype.isDebouncerActive = function(jobName) {};
209
210
211 /**
212 * Applies a CSS transform to the specified node, or this element if no node is
213 * specified. transform is specified as a string.
214 * @param {string} transform
215 * @param {HTMLElement=} node
216 */
217 PolymerElement.prototype.transform = function(transform, node) {};
218
219 /**
220 * Transforms the specified node, or this element if no node is specified.
221 * @param {string} x
222 * @param {string} y
223 * @param {string} z
224 * @param {HTMLElement=} node
225 */
226 PolymerElement.prototype.translate3d = function(x, y, z, node) {};
227
228 /**
229 * Dynamically imports an HTML document.
230 * @param {string} href
231 * @param {Function=} onload
232 * @param {Function=} onerror
233 */
234 PolymerElement.prototype.importHref = function(href, onload, onerror) {};
235
236 /**
237 * Delete an element from an array.
238 * @param {!Array} array
239 * @param {*} item
240 */
241 PolymerElement.prototype.arrayDelete = function(array, item) {};
242
243 /**
244 * Resolve a url to make it relative to the current doc.
245 * @param {string} url
246 * @return {string}
247 */
248 PolymerElement.prototype.resolveUrl = function(url) {};
249
250
251 /**
252 * A Polymer DOM API for manipulating DOM such that local DOM and light DOM
253 * trees are properly maintained.
254 *
255 * @constructor
256 */
257 var PolymerDomApi = function() {};
258
259 /** @param {!Node} node */
260 PolymerDomApi.prototype.appendChild = function(node) {};
261
262 /**
263 * @param {!Node} node
264 * @param {!Node} beforeNode
265 */
266 PolymerDomApi.prototype.insertBefore = function(node, beforeNode) {};
267
268 /** @param {!Node} node */
269 PolymerDomApi.prototype.removeChild = function(node) {};
270
271 /** @type {!Array<!Node>} */
272 PolymerDomApi.prototype.childNodes;
273
274 /** @type {?Node} */
275 PolymerDomApi.prototype.parentNode;
276
277 /** @type {?Node} */
278 PolymerDomApi.prototype.firstChild;
279
280 /** @type {?Node} */
281 PolymerDomApi.prototype.lastChild;
282
283 /** @type {?HTMLElement} */
284 PolymerDomApi.prototype.firstElementChild;
285
286 /** @type {?HTMLElement} */
287 PolymerDomApi.prototype.lastElementChild;
288
289 /** @type {?Node} */
290 PolymerDomApi.prototype.previousSibling;
291
292 /** @type {?Node} */
293 PolymerDomApi.prototype.nextSibling;
294
295 /** @type {string} */
296 PolymerDomApi.prototype.textContent;
297
298 /** @type {string} */
299 PolymerDomApi.prototype.innerHTML;
300
301 /**
302 * @param {string} selector
303 * @return {?HTMLElement}
304 */
305 PolymerDomApi.prototype.querySelector = function(selector) {};
306
307 /**
308 * @param {string} selector
309 * @return {!Array<?HTMLElement>}
310 */
311 PolymerDomApi.prototype.querySelectorAll = function(selector) {};
312
313 /** @return {!Array<!Node>} */
314 PolymerDomApi.prototype.getDistributedNodes = function() {};
315
316 /** @return {!Array<!Node>} */
317 PolymerDomApi.prototype.getDestinationInsertionPoints = function() {};
318
319 /**
320 * @param {string} attribute
321 * @param {string|number|boolean} value Values are converted to strings with
322 * ToString, so we accept number and boolean since both convert easily to
323 * strings.
324 */
325 PolymerDomApi.prototype.setAttribute = function(attribute, value) {};
326
327 /** @param {string} attribute */
328 PolymerDomApi.prototype.removeAttribute = function(attribute) {};
329
330 /** @type {?DOMTokenList} */
331 PolymerDomApi.prototype.classList;
332
333 /**
334 * Returns a Polymer-friendly API for manipulating DOM of a specified node.
335 *
336 * @param {?Node} node
337 * @return {!PolymerDomApi}
338 */
339 Polymer.dom = function(node) {};
340
341 Polymer.dom.flush = function() {};
342
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698