Home Start Get started Quick tour of Polymer Install Polymer 2.x Build an element 1. Get set up 2. Add local DOM 3. Data binding & properties 4. React to input 5. Theming with custom properties Build an app 1. Get set up 2. Create a new page 3. Add some elements 4. Deploy Polymer Feature overview About this release What's new in 2.0 Upgrade guide Hybrid elements Release notes Custom elements Custom element concepts Define an element Declare properties Shadow DOM & styling Shadow DOM concepts DOM templating Style shadow DOM Custom CSS properties Events Handle and fire events Gesture events Data system Data system concepts Work with object and array data Observers and computed properties Data binding Helper elements Browser support Overview Polyfills ES6 Tools Tools overview Polymer CLI Document your elements Test your elements Web services polymer.json specification Node support Resources Glossary API Reference API Reference Global settings App Toolbox What's in the box? Using the Toolbox App templates Responsive app layout Routing Localization App storage Service worker Deploy Build for production Serve your app The PRPL pattern Case study Shop News Blog Community Feature overview
About this release
What's new in 2.0 Upgrade guide Hybrid elements Release notes
Custom elements
Custom element concepts Define an element Declare properties
Shadow DOM & styling
Shadow DOM concepts DOM templating Style shadow DOM Custom CSS properties
Events
Handle and fire events Gesture events
Data system
Data system concepts Work with object and array data Observers and computed properties Data binding Helper elements
Browser support
Overview Polyfills ES6
Tools
Tools overview Polymer CLI Document your elements Test your elements Web services polymer.json specification Node support
Resources
Glossary
API Reference
API Reference Global settings

The following changes have been made since 2.0.0-rc.1.

  • Hybrid elements can make template instances with mutable data.

  • dom-change events now fire with the composed flag.

  • Allow properties, behaviors, observers, hostAttributes, and listeners to be set in Polymer({}) calls.

  • Behaviors can only be set on the element prototype.

  • Reintroduce beforeRegister to the legacy API to install dynamic property effects. In a difference from 1.x, is property cannot be set in this function.

  • Maintain 1.x ordering of ready() lifecycle call, where children will always ready() before the parent.

  • Made data binding system more extensible, allowing elements to override template binding functions.

    • Adds override points for _parseBindings and _evaluateBinding.

    • Add override points for _enableProperties and _flushProperties.

    • Adds support for runtime template binding using _stampTemplate.

    • More information on using binding overrides in issue #4510

  • Add $ ID map to dom-bind elements.

  • Support listening to Gesture events with dom-bind elements.

  • Start supporting compilation with Closure Compiler in 'ADVANCED' mode.

  • Allow setProperties to 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 PropertyEffects mixin with a more usable API. Add new static API for creating property effects which mirror the instance versions:

    • PropertyEffects.addPropertyEffect
    • PropertyEffects.createPropertyObserver
    • PropertyEffects.createMethodObserver
    • PropertyEffects.createNotifyingProperty
    • PropertyEffects.createReadOnlyProperty
    • PropertyEffects.createReflectedProperty
    • PropertyEffects.createComputedProperty
    • PropertyEffects.bindTemplate

    These static methods are not necessary if you're creating a standard Polymer element, but could be helpful for using the PropertyEffects mixin 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.

The following notable changes have been made since the 2.0 Preview announcement.

  • The config getter on element classes has been replaced by individual properties and observers getters, 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-style elements 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 rootPath and basePath were added to Polymer.Element to allow authors to configure how URLs are rewritten inside templates. For details, see the Update URLs in templates in the Upgrade guide.