-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathpolymer-1.0.js
1755 lines (1492 loc) · 49.8 KB
/
polymer-1.0.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright 2016 The Closure Compiler Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Closure compiler externs for the Polymer library.
* Originally part of the Polymer Project. Original license below.
*
* @externs
* @suppress {strictMissingProperties}
* @license
* Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt. The complete set of authors may be
* found at http://polymer.github.io/AUTHORS.txt. The complete set of
* contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt. Code
* distributed by Google as part of the polymer project is also subject to an
* additional IP rights grant found at http://polymer.github.io/PATENTS.txt.
*/
if (Math.random() < 1) {
throw "polymer externs should not be executed";
}
/**
* @param {!{is: string}} descriptor The Polymer descriptor of the element.
* @see https://github.com/Polymer/polymer/blob/0.8-preview/PRIMER.md#custom-element-registration
*/
var Polymer = function(descriptor) {};
/**
* Re-evaluates and applies custom CSS properties based on dynamic
* changes to this element's scope, such as adding or removing classes.
*
* For performance reasons, Polymer's custom CSS property shim relies
* on this explicit signal from the user to indicate when changes have
* been made that affect the values of custom properties.
*
* @param {Object=} properties Properties object which is mixed into
* the document root `customStyle` property. This argument provides a
* shortcut for setting `customStyle` and then calling `updateStyles`.
*
* @see http://polymer.github.io/polymer/
*/
Polymer.updateStyles = function(properties) {};
/** @constructor @extends {HTMLElement} */
var PolymerElement = function() {};
/**
* A mapping from ID to element in this Polymer Element's local DOM.
* @type {!Object}
*/
PolymerElement.prototype.$;
/**
* True if the element has been attached to the DOM.
* @type {boolean}
*/
PolymerElement.prototype.isAttached;
/**
* The root node of the element.
* @type {!Node}
*/
PolymerElement.prototype.root;
/**
* The root node for the element.
* Only exists if running under Shady Dom.
* You usually want to use `this.root`.
*
* @type {?Node|undefined}
*/
PolymerElement.prototype.shadyRoot;
/**
* Returns the first node in this element’s local DOM that matches selector.
* @param {string} selector
* @return {Element} Element found by the selector, or null if not found.
*/
PolymerElement.prototype.$$ = function(selector) {};
/** @type {string} The custom element tag name. */
PolymerElement.prototype.is;
/** @type {null|!HTMLTemplateElement} The element's template. */
PolymerElement.prototype._template;
/** @type {string} The native element this element extends. */
PolymerElement.prototype.extends;
/**
* An array of objects whose properties get added to this element.
* @see https://www.polymer-project.org/1.0/docs/devguide/behaviors.html
* @type {!Array<!Object>|undefined}
*/
PolymerElement.prototype.behaviors;
/**
* A string-separated list of dependent properties that should result in a
* change function being called. These observers differ from single-property
* observers in that the change handler is called asynchronously.
*
* @type {!Object<string, string>|undefined}
*/
PolymerElement.prototype.observers;
/** On create callback. */
PolymerElement.prototype.created = function() {};
/** On ready callback. */
PolymerElement.prototype.ready = function() {};
/** On before register callback. */
PolymerElement.prototype.beforeRegister = function() {};
/** On registered callback. */
PolymerElement.prototype.registered = function() {};
/** On attached to the DOM callback. */
PolymerElement.prototype.attached = function() {};
/** On detached from the DOM callback. */
PolymerElement.prototype.detached = function() {};
/**
* Callback fired when an attribute on the element has been changed.
*
* @param {string} name The name of the attribute that changed.
*/
PolymerElement.prototype.attributeChanged = function(name) {};
/** @typedef {!{
* type: !Function,
* reflectToAttribute: (boolean|undefined),
* readOnly: (boolean|undefined),
* notify: (boolean|undefined),
* value: *,
* computed: (string|undefined),
* observer: (string|undefined)
* }} */
PolymerElement.PropertyConfig;
/** @typedef {!Object<string, (!Function|!PolymerElement.PropertyConfig)>} */
PolymerElement.Properties;
/** @type {!PolymerElement.Properties} */
PolymerElement.prototype.properties;
/** @type {!Object<string, *>} */
PolymerElement.prototype.hostAttributes;
/**
* An object that maps events to event handler function names.
* @type {!Object<string, string>}
*/
PolymerElement.prototype.listeners;
/**
* Force this element to distribute its children to its local dom.
* A user should call `distributeContent` if distribution has been
* invalidated due to changes to selectors on child elements that
* effect distribution that were not made via `Polymer.dom`.
* For example, if an element contains an insertion point with
* `<content select=".foo">` and a `foo` class is added to a child,
* then `distributeContent` must be called to update
* local dom distribution.
* @param {boolean} updateInsertionPoints Shady DOM does not detect
* <content> insertion that is nested in a sub-tree being appended.
* Set to true to distribute to newly added nested <content>'s.
*/
PolymerElement.prototype.distributeContent = function(updateInsertionPoints) {};
/**
* Return the element whose local dom within which this element is contained.
* @type {?Element}
*/
PolymerElement.prototype.domHost;
/**
* Notifies the event binding system of a change to a property.
* @param {string} path The path to set.
* @param {*=} value The value to send in the update notification.
* @param {boolean=} fromAbove When true, specifies that the change came from
* above this element and thus upward notification is not necessary.
* @return {boolean} True if notification actually took place, based on a dirty
* check of whether the new value was already known.
*/
PolymerElement.prototype.notifyPath = function(path, value, fromAbove) {};
/**
* @param {string} path Path that should be notified.
* @param {!Array<!PolymerSplice>} splices Array of splice records indicating
* ordered changes that occurred to the array.
*/
PolymerElement.prototype.notifySplices = function(path, splices) {};
/**
* Convienence method for setting a value to a path and notifying any
* elements bound to the same path.
*
* Note, if any part in the path except for the last is undefined,
* this method does nothing (this method does not throw when
* dereferencing undefined paths).
*
* @param {(string|Array<(string|number)>)} path Path to the value
* to read. The path may be specified as a string (e.g. `foo.bar.baz`)
* or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that
* bracketed expressions are not supported; string-based path parts
* *must* be separated by dots. Note that when dereferencing array
* indices, the index may be used as a dotted part directly
* (e.g. `users.12.name` or `['users', 12, 'name']`).
* @param {*} value Value to set at the specified path.
* @param {Object=} root Root object from which the path is evaluated.
*/
PolymerElement.prototype.set = function(path, value, root) {};
/**
* Convienence method for reading a value from a path.
*
* Note, if any part in the path is undefined, this method returns
* `undefined` (this method does not throw when dereferencing undefined
* paths).
*
* @param {(string|Array<(string|number)>)} path Path to the value
* to read. The path may be specified as a string (e.g. `foo.bar.baz`)
* or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that
* bracketed expressions are not supported; string-based path parts
* *must* be separated by dots. Note that when dereferencing array
* indices, the index may be used as a dotted part directly
* (e.g. `users.12.name` or `['users', 12, 'name']`).
* @param {Object=} root Root object from which the path is evaluated.
* @return {*} Value at the path, or `undefined` if any part of the path
* is undefined.
*/
PolymerElement.prototype.get = function(path, root) {};
/**
* Adds items onto the end of the array at the path specified.
*
* The arguments after `path` and return value match that of
* `Array.prototype.push`.
*
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {...*} var_args Items to push onto array
* @return {number} New length of the array.
*/
PolymerElement.prototype.push = function(path, var_args) {};
/**
* Removes an item from the end of array at the path specified.
*
* The arguments after `path` and return value match that of
* `Array.prototype.pop`.
*
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @return {*} Item that was removed.
*/
PolymerElement.prototype.pop = function(path) {};
/**
* Starting from the start index specified, removes 0 or more items
* from the array and inserts 0 or more new itms in their place.
*
* The arguments after `path` and return value match that of
* `Array.prototype.splice`.
*
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {number} start Index from which to start removing/inserting.
* @param {number} deleteCount Number of items to remove.
* @param {...*} var_args Items to insert into array.
* @return {!Array} Array of removed items.
*/
PolymerElement.prototype.splice = function(path, start, deleteCount, var_args) {};
/**
* Removes an item from the beginning of array at the path specified.
*
* The arguments after `path` and return value match that of
* `Array.prototype.pop`.
*
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @return {*} Item that was removed.
*/
PolymerElement.prototype.shift = function(path) {};
/**
* Adds items onto the beginning of the array at the path specified.
*
* The arguments after `path` and return value match that of
* `Array.prototype.push`.
*
* This method notifies other paths to the same array that a
* splice occurred to the array.
*
* @param {string} path Path to array.
* @param {...*} var_args Items to insert info array
* @return {number} New length of the array.
*/
PolymerElement.prototype.unshift = function(path, var_args) {};
/**
* Returns a list of element children distributed to this element's
* `<content>`.
*
* If this element contans more than one `<content>` in its
* local DOM, an optional selector may be passed to choose the desired
* content. This method differs from `getContentChildNodes` in that only
* elements are returned.
*
* @param {string=} slctr CSS selector to choose the desired
* `<content>`. Defaults to `content`.
* @return {!Array<!HTMLElement>} List of distributed nodes for the
* `<content>`.
*/
PolymerElement.prototype.getContentChildren = function(slctr) {};
/**
* Returns a list of nodes that are the effective childNodes. The effective
* childNodes list is the same as the element's childNodes except that
* any `<content>` elements are replaced with the list of nodes distributed
* to the `<content>`, the result of its `getDistributedNodes` method.
*
* @return {!Array<!Node>} List of effective child nodes.
*/
PolymerElement.prototype.getEffectiveChildNodes = function() {};
/**
* Returns a list of elements that are the effective children. The effective
* children list is the same as the element's children except that
* any `<content>` elements are replaced with the list of elements
* distributed to the `<content>`.
*
* @return {!Array<!Node>} List of effective children.
*/
PolymerElement.prototype.getEffectiveChildren = function() {};
/**
* Returns a string of text content that is the concatenation of the
* text content's of the element's effective childNodes (the elements
* returned by <a href="#getEffectiveChildNodes>getEffectiveChildNodes</a>.
*
* @return {string} A concatenated string of all effective childNode text
* content.
*/
PolymerElement.prototype.getEffectiveTextContent = function() {};
/**
* Returns the first effective child that match selector.
*
* @param {string} selector
* @return {?HTMLElement}
*/
PolymerElement.prototype.queryEffectiveChildren = function(selector) {};
/**
* Returns a list of effective children that match selector.
*
* @param {string} selector
* @return {!Array<!HTMLElement>}
*/
PolymerElement.prototype.queryAllEffectiveChildren = function(selector) {};
/**
* Fire an event.
*
* @param {string} type An event name.
* @param {*=} detail
* @param {{
* bubbles: (boolean|undefined),
* cancelable: (boolean|undefined),
* node: (!EventTarget|undefined)}=} options
* @return {Object} event
*/
PolymerElement.prototype.fire = function(type, detail, options) {};
/**
* Toggles the named boolean class on the host element, adding the class if
* bool is truthy and removing it if bool is falsey. If node is specified, sets
* the class on node instead of the host element.
* @param {string} name
* @param {boolean=} bool
* @param {HTMLElement=} node
*/
PolymerElement.prototype.toggleClass = function(name, bool, node) {};
/**
* Toggles the named boolean attribute on the host element, adding the attribute
* if bool is truthy and removing it if bool is falsey. If node is specified,
* sets the attribute on node instead of the host element.
* @param {string} name
* @param {boolean=} bool
* @param {HTMLElement=} node
*/
PolymerElement.prototype.toggleAttribute = function(name, bool, node) {};
/**
* Moves a boolean attribute from oldNode to newNode, unsetting the attribute
* (if set) on oldNode and setting it on newNode.
* @param {string} name
* @param {!HTMLElement} newNode
* @param {!HTMLElement} oldNode
*/
PolymerElement.prototype.attributeFollows = function(name, newNode, oldNode) {};
/**
* Convenience method to add an event listener on a given element, late bound to
* a named method on this element.
* @param {!EventTarget} node Element to add event listener to.
* @param {string} eventName Name of event to listen for.
* @param {string} methodName Name of handler method on this to call.
*/
PolymerElement.prototype.listen = function(node, eventName, methodName) {};
/**
* Convenience method to remove an event listener from a given element.
* @param {?EventTarget} node Element to remove event listener from.
* @param {string} eventName Name of event to stop listening for.
* @param {string} methodName Name of handler method on this to remove.
*/
PolymerElement.prototype.unlisten = function(node, eventName, methodName) {};
/**
* Override scrolling behavior to all direction, one direction, or none.
*
* Valid scroll directions:
* 'all': scroll in any direction
* 'x': scroll only in the 'x' direction
* 'y': scroll only in the 'y' direction
* 'none': disable scrolling for this node
*
* @param {string=} direction Direction to allow scrolling Defaults to all.
* @param {HTMLElement=} node Element to apply scroll direction setting.
* Defaults to this.
*/
PolymerElement.prototype.setScrollDirection = function(direction, node) {};
/**
* @param {!Function} method
* @param {number=} wait
* @return {number} A handle which can be used to cancel the job.
*/
PolymerElement.prototype.async = function(method, wait) {};
/**
* @param {...*} var_args
*/
PolymerElement.prototype.factoryImpl = function(var_args) {};
/**
* Apply style scoping to the specified container and all its descendants.
* @param {!Element} container Element to scope.
* @param {boolean} shouldObserve When true, monitors the container for changes
* and re-applies scoping for any future changes.
*/
PolymerElement.prototype.scopeSubtree = function(container, shouldObserve) {};
/**
* Aliases one data path as another, such that path notifications from one
* are routed to the other.
*
* @param {string} to Target path to link.
* @param {string} from Source path to link.
*/
PolymerElement.prototype.linkPaths = function(to, from) {}
/**
* Removes a data path alias previously established with `linkPaths`.
*
* Note, the path to unlink should be the target (`to`) used when
* linking the paths.
*
* @param {string} path Target path to unlink.
*/
PolymerElement.prototype.unlinkPaths = function(path) {}
/**
* Copies own properties (including accessor descriptors) from a source
* object to a target object.
*
* @param {?Object} target Target object to copy properties to.
* @param {?Object} source Source object to copy properties from.
* @return {?Object} Target object that was passed as first argument or source
* object if the target was null.
*/
PolymerElement.prototype.extend = function(target, source) {};
/** @const */
Polymer.Base = {};
/**
* Used by the promise-polyfill on its own.
*
* @param {!Function} method
* @param {number=} wait
* @return {number} A handle which can be used to cancel the job.
*/
Polymer.Base.async = function(method, wait) {};
/**
* @param {string} tag
* @param {!Object=} props
* @return {!Element}
*/
Polymer.Base.create = function(tag, props) {};
/**
* Copies own properties (including accessor descriptors) from a source
* object to a target object.
*
* @param {?Object} target Target object to copy properties to.
* @param {?Object} source Source object to copy properties from.
* @return {?Object} Target object that was passed as first argument or source
* object if the target was null.
*/
Polymer.Base.extend = function(target, source) {};
/**
* Returns a property descriptor object for the property specified.
*
* This method allows introspecting the configuration of a Polymer element's
* properties as configured in its `properties` object. Note, this method
* normalizes shorthand forms of the `properties` object into longhand form.
*
* @param {string} property Name of property to introspect.
* @return {Object} Property descriptor for specified property.
*/
Polymer.Base.getPropertyInfo = function(property) {};
/**
* Dynamically imports an HTML document.
* @param {string} href
* @param {Function=} onload
* @param {Function=} onerror
* @param {boolean=} async
*/
Polymer.Base.importHref = function(href, onload, onerror, async) {};
/**
* Copies props from a source object to a target object.
*
* Note, this method uses a simple `for...in` strategy for enumerating
* properties. To ensure only `ownProperties` are copied from source
* to target and that accessor implementations are copied, use `extend`.
*
* @param {!Object} target Target object to copy properties to.
* @param {?Object} source Source object to copy properties from.
* @return {!Object} Target object that was passed as first argument.
*/
Polymer.Base.mixin = function(target, source) {};
/**
* @param {string|!Array<string|number>} path
* @param {!Object=} root
* @return {*}
*/
Polymer.Base.get = function(path, root) {};
/**
* @param {string} type
* @param {*=} detail
* @param {!Object=} options
* @return {!CustomEvent}
*/
Polymer.Base.fire = function(type, detail, options) {};
/**
* For Polymer internal use only, except for
* github.com/Polymer/polymer/issues/4138
* @type {!function (!Node, ?string, *, ?Object)}
*/
Polymer.Base._computeFinalAnnotationValue;
/**
* @param {...*} var_args
* For Polymer-internal use only.
*/
Polymer.Base._warn = function(var_args) {};
/**
* @param {...*} var_args
* For Polymer-internal use only.
*/
Polymer.Base._error = function(var_args) {};
/** @const */
Polymer.Gestures = {};
/**
* @param {!Node} node
* @param {string} evType
* @param {?Function} handler
* @return {boolean}
* @deprecated Use addListener.
*/
Polymer.Gestures.add = function(node, evType, handler) {};
/**
* @param {!Node} node
* @param {string} evType
* @param {?Function} handler
* @return {boolean}
*/
Polymer.Gestures.addListener = function(node, evType, handler) {};
/**
* Gets the original target of the given event.
*
* Cheaper than Polymer.dom(ev).path[0];
* See https://github.com/Polymer/polymer/blob/master/src/standard/gestures.html#L191
*
* @param {Event} ev .
* @return {Element} The original target of the event.
*/
Polymer.Gestures.findOriginalTarget = function(ev) {};
/**
* @type {!Object}
*/
Polymer.Gestures.gestures = {};
/**
* @param {Node} node
* @param {string} value
*/
Polymer.Gestures.setTouchAction = function(node, value) {};
/**
* @type {!Object}
*/
Polymer.Gestures.gestures.tap = {};
/**
* Reset the tap gesture's state manually
* @type {function()}
*/
Polymer.Gestures.gestures.tap.reset = function() {};
/**
* @param {number} handle
*/
PolymerElement.prototype.cancelAsync = function(handle) {};
/**
* Call debounce to collapse multiple requests for a named task into one
* invocation, which is made after the wait time has elapsed with no new
* request. If no wait time is given, the callback is called at microtask timing
* (guaranteed to be before paint).
* @param {string} jobName
* @param {!Function} callback
* @param {number=} wait
*/
PolymerElement.prototype.debounce = function(jobName, callback, wait) {};
/**
* Cancels an active debouncer without calling the callback.
* @param {string} jobName
*/
PolymerElement.prototype.cancelDebouncer = function(jobName) {};
/**
* Calls the debounced callback immediately and cancels the debouncer.
* @param {string} jobName
*/
PolymerElement.prototype.flushDebouncer = function(jobName) {};
/**
* @param {string} jobName
* @return {boolean} True if the named debounce task is waiting to run.
*/
PolymerElement.prototype.isDebouncerActive = function(jobName) {};
/**
* Applies a CSS transform to the specified node, or this element if no node is
* specified. transform is specified as a string.
* @param {string} transform
* @param {HTMLElement=} node
*/
PolymerElement.prototype.transform = function(transform, node) {};
/**
* Transforms the specified node, or this element if no node is specified.
* @param {number|string} x
* @param {number|string} y
* @param {number|string} z
* @param {HTMLElement=} node
*/
PolymerElement.prototype.translate3d = function(x, y, z, node) {};
/**
* Dynamically imports an HTML document.
* @param {string} href
* @param {Function=} onload
* @param {Function=} onerror
* @param {boolean=} async
*/
PolymerElement.prototype.importHref = function(href, onload, onerror, async) {};
/**
* Checks whether an element is in this element's light DOM tree.
* @param {?Node} node The element to be checked.
* @return {boolean} true if node is in this element's light DOM tree.
*/
PolymerElement.prototype.isLightDescendant = function(node) {};
/**
* Checks whether an element is in this element's local DOM tree.
* @param {?Node} node The element to be checked.
* @return {boolean} true if node is in this element's local DOM tree.
*/
PolymerElement.prototype.isLocalDescendant = function(node) {};
/**
* Delete an element from an array.
* @param {!Array|string} array Path to array from which to remove the item (or
* the array itself).
* @param {*} item Item to remove
* @return {!Array} The array with the item removed.
*/
PolymerElement.prototype.arrayDelete = function(array, item) {};
/**
* Resolve a url to make it relative to the current doc.
* @param {string} url
* @return {string}
*/
PolymerElement.prototype.resolveUrl = function(url) {};
/**
* Re-evaluates and applies custom CSS properties based on dynamic
* changes to this element's scope, such as adding or removing classes
* in this element's local DOM.
*
* For performance reasons, Polymer's custom CSS property shim relies
* on this explicit signal from the user to indicate when changes have
* been made that affect the values of custom properties.
*
* @param {Object=} properties Properties object which, if provided is mixed
* into the element's `customStyle` property. This argument provides a
* shortcut for setting `customStyle` and then calling `updateStyles`.
*/
PolymerElement.prototype.updateStyles = function(properties) {};
/**
* @type {!Object<string, string|undefined>}
*/
PolymerElement.prototype.customStyle;
/**
* Convenience method for creating an element and configuring it.
* @param {string} tagName HTML tag name
* @param {IObject<string, *>=} properties Object of properties to configure on the instance
* @return {!Element}
*/
PolymerElement.prototype.create = function(tagName, properties) {};
/**
* Returns the computed style value for the given property.
* @param {string} property
* @return {string} the computed value
*/
PolymerElement.prototype.getComputedStyleValue = function(property) {};
/**
* Logs a message to the console.
*
* @param {...*} var_args
* @protected
*/
PolymerElement.prototype._log = function(var_args) {};
/**
* Logs a message to the console with a 'warn' level.
*
* @param {...*} var_args
* @protected
*/
PolymerElement.prototype._warn = function(var_args) {};
/**
* Logs a message to the console with an 'error' level.
*
* @param {...*} var_args
* @protected
*/
PolymerElement.prototype._error = function(var_args) {};
/**
* Formats string arguments together for a console log.
*
* @param {...*} var_args
* @return {!Array} The formatted array of args to a log function.
* @protected
*/
PolymerElement.prototype._logf = function(var_args) {};
/** @type {boolean} True after this.ready() has run */
PolymerElement.prototype._readied;
/**
* Do not call this function.
*
* @param {string} path .
* @param {*} value .
*/
PolymerElement.prototype._notifyPathUp = function(path, value) {};
/**
* Do not call this function.
*
* @param {string} path .
* @param {*} value .
*/
PolymerElement.prototype._pathEffector = function(path, value) {};
/**
* Do not call this function.
*
* @param {string} path .
* @param {*} value .
*/
PolymerElement.prototype._propertySetter = function(path, value) {};
/**
* Do not call this function.
*
* @param {string} path .
*/
PolymerElement.prototype._notifyChange = function(path) {};
/**
* A Polymer DOM API for manipulating DOM such that local DOM and light DOM
* trees are properly maintained.
*
* @constructor
*/
var PolymerDomApi = function() {};
/**
* @param {?Node} node
* @return {boolean}
*/
PolymerDomApi.prototype.deepContains = function(node) {};
/** @param {!Node} node */
PolymerDomApi.prototype.appendChild = function(node) {};
/**
* @param {!Node} oldNode
* @param {!Node} newNode
*/
PolymerDomApi.prototype.replaceChild = function(oldNode, newNode) {};
/**
* @param {!Node} node
* @param {?Node} beforeNode
*/
PolymerDomApi.prototype.insertBefore = function(node, beforeNode) {};
/** @param {!Node} node */
PolymerDomApi.prototype.removeChild = function(node) {};
/** @type {!Array<!HTMLElement>} */
PolymerDomApi.prototype.children;
/** @type {!Array<!Node>} */
PolymerDomApi.prototype.childNodes;
/** @type {?Node} */
PolymerDomApi.prototype.parentNode;
/** @type {?Node} */
PolymerDomApi.prototype.firstChild;
/** @type {?Node} */
PolymerDomApi.prototype.lastChild;
/** @type {?HTMLElement} */
PolymerDomApi.prototype.firstElementChild;
/** @type {?HTMLElement} */
PolymerDomApi.prototype.lastElementChild;
/** @type {?Node} */
PolymerDomApi.prototype.previousSibling;
/** @type {?Node} */
PolymerDomApi.prototype.nextSibling;
/** @type {?HTMLElement} */
PolymerDomApi.prototype.previousElementSibling;
/** @type {?HTMLElement} */
PolymerDomApi.prototype.nextElementSibling;
/** @type {string} */
PolymerDomApi.prototype.textContent;
/** @type {string} */
PolymerDomApi.prototype.innerHTML;
/** @type {?HTMLElement} */
PolymerDomApi.prototype.activeElement;
/**
* @param {string} selector
* @return {?HTMLElement}
*/
PolymerDomApi.prototype.querySelector = function(selector) {};
/**
* @param {string} selector
* @return {!Array<!HTMLElement>}
*/
PolymerDomApi.prototype.querySelectorAll = function(selector) {};
/** @return {!Array<!Node>} */
PolymerDomApi.prototype.getDistributedNodes = function() {};
/** @return {!Array<!Node>} */
PolymerDomApi.prototype.getDestinationInsertionPoints = function() {};
/** @return {?Node} */
PolymerDomApi.prototype.getOwnerRoot = function() {};
/**
* @param {string} attribute
* @param {string|number|boolean} value Values are converted to strings with
* ToString, so we accept number and boolean since both convert easily to
* strings.
*/
PolymerDomApi.prototype.setAttribute = function(attribute, value) {};
/** @param {string} attribute */
PolymerDomApi.prototype.removeAttribute = function(attribute) {};
/**
* @typedef {function(!PolymerDomApi.ObserveInfo)}
*/
PolymerDomApi.ObserveCallback;
/**
* @typedef {{
* target: !Node,
* addedNodes: !Array<!Node>,
* removedNodes: !Array<!Node>
* }}
*/
PolymerDomApi.ObserveInfo;
/**
* A virtual type for observer callback handles.
*
* @private @constructor
*/
PolymerDomApi.ObserveHandle = function() {};
/**
* Notifies callers about changes to the element's effective child nodes,
* the same list as returned by `getEffectiveChildNodes`.
*
* @param {!PolymerDomApi.ObserveCallback} callback The supplied callback
* is called with an `info` argument which is an object that provides
* the `target` on which the changes occurred, a list of any nodes
* added in the `addedNodes` array, and nodes removed in the
* `removedNodes` array.
*
* @return {!PolymerDomApi.ObserveHandle} Handle which is the argument to
* `unobserveNodes`.
*/
PolymerDomApi.prototype.observeNodes = function(callback) {};
/**
* Stops observing changes to the element's effective child nodes.
*
* @param {!PolymerDomApi.ObserveHandle} handle The handle for the
* callback that should no longer receive notifications. This
* handle is returned from `observeNodes`.