1) What is Polymer.js?

Polymer.js is an open source JavaScript library. It is developed by Google. It is used to develop web applications for using of web components like HTML.

2) Describe architecture of Polymer.js.

The architecture of Polymer.js is divided into four important layers:

3) What are the features of Polymer.js?

Following are the features of Polymer.js:

  • It is simplest way to create custom elements.
  • It has both One-way and Two-way data binding.
  • It provides polyfills for creating it’s own customized elements.
  • It has computed properties.
  • It provides gesture events.

4) What are the Polymer elements?

It provides elements that we can use in our web pages and applications. These elements are built with the Polymer library.

5) Name the types of polymer elements.

Following are the types of polymer elements:

6) What is custom elements?

It provide a component model for the web.

7) What are the features provided by custom elements?

Custom elements provides the following features.

8) What are the reactions apply in custom elements life cycle?

It provides the set of custom element reactions that allows to change in elements lifecycle.

Reaction Description
Constructor It is called when element is upgraded.
Connected Callback It is called when element is added to a document.
Disconnected Callback It is called when element is removed to a document.
AttributeChangedCallback It is called when element is change, append, remove or replace.

9) What are events in polymer.js?

Event is something that happens at specific time and lead to some changes. polymer.js provides own methods to perform events like: on-click, on-tap, on-mouseover etc. we can also create our own custom events.

It also provides listener objects that can be used to bind events to execute functions.

10) What is Data system in polymer.js?

In Data system, polymer.js allows us to observe changes on an element’s properties by taking different actions.

Data system actions include following properties:

Observers: It invokes specified method whenever data changes.

Computed properties: It computes the virtual properties which is based on other properties and recompute when the input data change.

Data binding: By using of annotation we can update the properties, attributes or text content whenever data changes.

11) What is shadow DOM?

Shadow DOM is a new DOM (Document Object Modeling) features Which is used for Building component.

12) What is shadow DOM styling?

It is a process of styling shadow DOM by using style properties. It inherits properties from host to shadow tree.

Let’s see an example.

Shadow DOM Style Example

Pin It on Pinterest

Share This