Google’s Polymer zeroes in on ES6 compatibility, interoperability

Posted on 18-05-2017 , by: admin , in , 0 Comments

Polymer, Google’s open source JavaScript library for building reusable HTML elements, has graduated to version 2.0, a major revision that improves the data system, interoperability with other web libraries and frameworks, and support for ECMAScript 6 standards. ECMAScript is the official specification underlying JavaScript and implemented in web browsers.

Arriving nearly two years after Polymer 1.0, the 2.0 release complies with HTML custom elements v1, for creating new HTML tags, and shadow DOM v1, for self-contained web components. Developers can now draw on Polymer APIs associated with both specifications. Polymer 2.0 uses standard ECMAScript 6 classes and custom elements v1 methods rather than a Polymer factory method, according to release notes. Developers can mix Polymer features with standard JavaScript, although the factory method is still supported via a compatibility layer. 

“Polymer 2.0 is based on web platform standards that are natively supported on over 1 billion mobile devices,” Google’s Wendy Ginsberg, project manager for Polymer, said at the recent Google I/O conference in Silicon Valley. The upgrade is one-quarter the size of Polymer 1.0, she said. Web components built with version 2.0 are interoperable by default, meaning they can be used in popular JavaScript frameworks.

Improvements to the data system make it easier to debug the propagation of data across elements. Simpler array handling is featured along with batched data changes, which can improve performance and correctness.