Release 2.0.0 (2017-03-15)
The following changes have been made since 2.0.0-rc.1.
-
Hybrid elements can make template instances with mutable data.
-
dom-changeevents now fire with thecomposedflag. -
Allow
properties,behaviors,observers,hostAttributes, andlistenersto be set inPolymer({})calls. -
Behaviors can only be set on the element prototype.
-
Reintroduce
beforeRegisterto the legacy API to install dynamic property effects. In a difference from 1.x,isproperty cannot be set in this function. -
Maintain 1.x ordering of
ready()lifecycle call, where children will alwaysready()before the parent. -
Made data binding system more extensible, allowing elements to override template binding functions.
-
Adds override points for
_parseBindingsand_evaluateBinding. -
Add override points for
_enablePropertiesand_flushProperties. -
Adds support for runtime template binding using
_stampTemplate. -
More information on using binding overrides in issue #4510
-
-
Add
$ID map todom-bindelements. -
Support listening to Gesture events with
dom-bindelements. -
Start supporting compilation with Closure Compiler in 'ADVANCED' mode.
-
Allow
setPropertiesto set readOnly properties:this.setProperties({readOnlyProp: value}, true)` -
Prevent properties from reverting to default value after boot when the property has no observers.
-
Fix
linkPaths()to handle aliased paths. -
Fix for observers firing before
ready(). -
Refactor
PropertyEffectsmixin with a more usable API. Add new static API for creating property effects which mirror the instance versions:PropertyEffects.addPropertyEffectPropertyEffects.createPropertyObserverPropertyEffects.createMethodObserverPropertyEffects.createNotifyingPropertyPropertyEffects.createReadOnlyPropertyPropertyEffects.createReflectedPropertyPropertyEffects.createComputedPropertyPropertyEffects.bindTemplate
These static methods are not necessary if you're creating a standard Polymer element, but could be helpful for using the
PropertyEffectsmixin on its own. -
Fix a bug where setting a property inside of a notification event listener could break the guarantee that clients should be ready before host side effects are processed.
For a release-by-release breakdown of the release candidates, see the raw release notes on GitHub.
Release 2.0.0-rc.1 (2017-03-06)
The following notable changes have been made since the 2.0 Preview announcement.
-
The
configgetter on element classes has been replaced by individualpropertiesandobserversgetters, more closely resembling the 1.x syntax.static get properties() { return { aProp: String, bProp: Number } } static get observers() { return [ '_observeStuff(aProp,bProp)' ] } -
1.x-style dirty checking has been reinstated for better performance. An optional mixin is available for elements to skip dirty checking of objects and arrays, which may be more easy to integrate with some state management systems. For details, see Using the MutableData mixin in Data system concepts.
-
Support for dynamically-created
custom-styleelements has been added. -
Support for the external style sheet syntax,
<link rel="import" type="css">has been added. This was deprecated in 1.x, but will be retained until an alternate solution is available for importing unprocessed CSS. -
New properties
rootPathandbasePathwere added toPolymer.Elementto allow authors to configure how URLs are rewritten inside templates. For details, see the Update URLs in templates in the Upgrade guide.