Skip to content

Stable Release v1.8.0

Compare
Choose a tag to compare
@dfreedm dfreedm released this 07 Feb 00:42
· 6886 commits to master since this release

New Features

Suppress notification events

  • New global setting: Polymer = { suppressTemplateNotifications: true }
    • suppresses dom-change and rendered-item-count events from dom-if, dom-repeat, and dom-bind. Users can opt back into dom-change events by setting the notify-dom-change attribute (notifyDomChange: true property) to dom-if/dom-repeat instances.
  • 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 a foo observer) or calling addEventListener('foo-changed', ...) on an element where foo 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.

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 to disable-upgrade and feature is now supported only via the disable-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>. Setting xFoo.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 than copyOwnProperty (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- disables dom-change and rendered-item-count events from dom-if, dom-repeat, and don-bind. Users can opt back into dom-change events by setting the notify-dom-change attribute (notifyDomChange: true property) to dom-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 calling addEventListener('foo-changed', ...) on an element where foo 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)