Polymer Framework Interview Questions
In this post we will look at Polymer Framework Interview questions. Examples are provided with explanation.
Q: What is Polymer Framework?
A: Polymer.js is a JavaScript library created by Google that allows reusing the HTML elements for building applications with components. Polymer is an open-source JavaScript library developed by Google developers and was initially released on May 27, 2015.
Q: What are the advantages of using Polymer Framework?
A: The Advantages of using Polymer are as follows-
- It allows users to create their own custom elements easily using the HTML, CSS, and JavaScript for adding interactions to the element.
- Provides cross-browser compatibility long with web components.
- Polymer command line interface helps managing complex projects
- Provides both one-way and two way binding.
A: Polymer contains a few primary collections of elements:
- Iron elements. A set of utility elements including generic UI elements (such as icons, input and layout components), as well as non-UI elements providing features like AJAX, signaling and storage.
- Paper elements. A set of UI elements that implement the material design system.
- Gold elements. Form elements for ecommerce.
- Neon elements. Animation-related elements.
- Platinum elements. Elements for app-like features, like push notifications, offline caching and bluetooth.
Q: How to create custom elements using Polymer Framework?
A: Custom elements provide a component model for the web. The custom elements specification provides:
- A mechanism for associating a class with a custom element name.
- >A set of lifecycle callbacks invoked when an instance of the custom element changes state (for example, added or removed from the document).
- >A callback invoked whenever one of a specified set of attributes changes on the instance.