* When extended, a behavior `registered` is always called on sub-most prototype rather than the prototype on which `registered` was defined.
* behavior property default values are overwritten by later behaviors and elements
* readOnly properties ignored when a previous behavior observes the property
* observedAttributes when extended
* ensure element has `is` on prototype early as this is sometimes checked in user code.
* ensure properties copied onto elements from info/behaviors are forced to configurable so they can be re-configured by later behaviors.
* add `_noAccessors` optimization for faster property copying
This branch actually fixes this issue. A behavior specified template should win over a template specified via a dom-module. Updating the test here, which was validating the wrong result.
These interface types only exist for Closure compilation compatibility
between V1 and V2/3, but there's no reason to have them in our
TypeScript types.
- PolymerDomApi -> DomApi
- PolymerDomApi.ObserveHandle -> FlattenedNodesObserver
Polymer V1 applications are compiled with hand-written externs at
https://github.com/google/closure-compiler/blob/master/contrib/externs/polymer-1.0.js.
These externs contain some types that do not exist in the V2 code.
PolymerDomApi is the type returned by the V1 Polymer.dom API, but in V2
it returns Polymer.DomApi. This adds the PolymerDomApi interface to the
V2 externs, and annotates that Polymer.DomApi implements it. This allows
both V1 and V2 code to use the PolymerDomApi type. Similar story for
PolymerDomApi.ObserveCallback.
Polymer.Iconset would ideally live in the iron-iconset repo, but many
packages reference the type without actually depending on that library,
so its simpler to just include it here, similar to how it worked for
Polymer V1.
In polymer.dom.js, we stick __domApi on nodes, but we don't prevent that
property from being renamed when compiled. It seems that the renamed
property can sometimes collide in a bad way with some other unsafe
property we stick on nodes in the polyfill (not sure which yet).