Stable Release v1.8.0
New Features
Suppress notification events
- New global setting:
Polymer = { suppressTemplateNotifications: true }
- suppresses
dom-change
andrendered-item-count
events fromdom-if
,dom-repeat
, anddom-bind
. Users can opt back intodom-change
events by setting thenotify-dom-change
attribute (notifyDomChange: true
property) todom-if
/dom-repeat
instances.
- suppresses
- New global setting:
Polymer = { suppressBindingNotifications: true }
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like
<my-el foo="{{foo}} on-foo-changed="{{handleFoo}}">
(which is generally unnecessary since the host element doing the binding can use afoo
observer) or callingaddEventListener('foo-changed', ...)
on an element wherefoo
is bound. We attempted to make this the default some time back but needed to revert it when we found via #3077 that users were indeed doing this in corner-case scenarios. Users that avoid these patterns can enjoy the potentially significant benefit of suppressing unnecessary events during downward data flow by opting into this flag.
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like
disable-upgrade
attribute
Adds a disable-upgrade
attribute API for all Polymer elements when global opt-in setting Polymer = { disableUpgradeEnabled: true }
is set. This is a lightweight feature useful for performance tuning an application, giving fine-grained control over individual element instantiation cost.
When an element is marked with the disable-upgrade
attribute, its createdCallback
will return early without performing any of the normal Polymer element initialization steps (e.g. stamping template, setting default properties, running observers, etc.). The element will behave similar to an element that has not had its definition loaded, except that it will actually have the correct prototype (as such, methods should not be called on the element until its disable-upgrade
attribute has been removed).
Removing the disable-upgrade
attribute will then cause the element to boot up, initialize its properties, stamp its template, etc.
Note this feature is implemented as an attribute API only. There is no corresponding disableUpgrade
property. As such, any bindings should be via attribute bindings, e.g. <my-element disable-upgrade$="{{!loggedIn}}">
.
Meaningful Changes
<template strip-whitespace>
The strip-whitespace
attribute is now recursive to descendant templates, stripping whitespace from nested <template is="dom-repeat">
and <template is="dom-if>
elements.
Raw Notes
- Add comment. (commit)
- Only keep
disable-upgrade
attribute if it is an attribute binding. (commit) - spacing. (commit)
- Update webcomponentsjs dependency (commit)
- Change
isInert
todisable-upgrade
and feature is now supported only via thedisable-upgrade
attribute. (commit) - Add tests for
is-inert
(commit) - Prevent annotator from removing the
is-inert
attribute. (commit) - fixes for users of Polymer.Class (commit)
- Add support for
isInert
to allow elements to boot up in an inert state. e.g.<x-foo is-inert></x-foo>
. SettingxFoo.isInert = false
causes the element to boot up. (commit) - Small typos updated (commit)
- work around older firefox handling of the "properties" property on HTMLElement prototype (commit)
- improve comments (commit)
- Add comments. Behavior fast copy flag changed to
_noAccessors
. (commit) - Fix tests on IE10 and simplify constructor shortcut. (commit)
- Make dom-module work on older Safari. (commit)
- micro-optimizations: (1) favor mixin over extends where possible, (2) unroll behavior lifecycle calls, (3) avoid creating a custom constructor when not used, (4) provide
_skipDefineProperty
setting on behaviors which copies properties via assignment rather thancopyOwnProperty
(commit) - Ensure done. (commit)
- Test positive case of suppressBindingNotifications (commit)
- Add notifyDomBind to dom-bind. (commit)
- Test Polymer.Settings inside test. (commit)
- Revert unnecessary change. (commit)
- Fix test lint issue. (commit)
- Add global flags to suppress unnecessary notification events. Fixes #4262. *
Polymer.Settings.suppressTemplateNotifications
- disablesdom-change
andrendered-item-count
events fromdom-if
,dom-repeat
, anddon-bind
. Users can opt back intodom-change
events by setting thenotify-dom-change
attribute (notifyDomChange: true
property) todom-if
/don-repeat
instances. *Polymer.Settings.suppressBindingNotifications
- disables notify effects when propagating data downward via bindings. Generally these are never useful unless users are explicitly doing something like<my-el foo="{{foo}} on-foo-changed="{{handleFoo}}">
or callingaddEventListener('foo-changed', ...)
on an element wherefoo
is bound (we attempted to make this the default some time back but needed to revert it when we found via #3077 that users were indeed doing this). Users that avoid these patterns can enjoy the potentially significant benefit of suppressing unnecessary events during downward data flow by opting into this flag. (commit) - Fix
strip-whitespace
for nested templates. (commit) - [ci skip] update changelog v1.7.1 (commit)
- Close backtick in ISSUE_TEMPLATE.md (commit)