* Add support for TrustedTypes to html-tag.js
This avoids setting innerHTML to a string.
* Comment on why .slice() the XMLSerializer output
* Handle data binding Trusted Types into attributes
Fixes#5648
* Lint clean
Applies a number of optimizations that speed up defining a legacy element. These optimizations are mostly beneficial when a large number of elements are defined that are not used for initial render.
* Fixes an issue with `dedupingMixin` that was causing info to be cached on the resulting class even when no mixin should be applied.
* In Polymer.Class, avoids using `LegacyElementMixin(HTMLElement)` in favor of a cached `LegacyElement`.
* Copies `DisableUpgradeMixin` into Polymer's legacy class generation. This avoids the need to mix this on top of all legacy elements.
* Adds `legacyNoAttributes` setting which avoids setting `observedAttributes` and instead (1) applies the values of all attributes at create time, (2) patches set/removeAttribute so that they call attributeChangedCallback. This is faster since it avoids the work Polymer needs to do to calculate `observedAttributes`.
Uses `shadowRoot.adoptedStyleSheets` for element styling when supported (currently Chrome) and only if a css build is used. The build restriction is in place in order to support `@apply` via ShadyCSS. Currently ShadyCSS works only with a style element in the element template.
Applies micro-optimizations that were found to improve element creation benchmarks by 5-10%, and removes obsolete settings:
* Removed `legacyNoBatch` and `legacyNotifyOrder` settings.
* dom-if/repeat: `dom-change` and `renderedCount` no longer fire with `legacyOptimizations` set.
* legacy-element-mixin: `isAttached` now set before calling `connectedCallback` so it is batched with initial rendering.
* `PropertiesChanged`: property accessor code now inlined for efficiency rather than calling `_get/_setProperty`. The `__dataCounter` tracking flag has been moved here to avoid the need to override `_flushProperties` in `PropertyEffects`.
* `PropertyEffects`: inlined `runEffectsForProperty` into `runEffects` for efficiency. Removed wrapping around sending data events.
* `async`: In the microtask scheduler, now only provoke a DOM mutation if needed.