Author: Awais Farooq

  • Events

    Events are used by the elements that can communicate with state changes of DOM tree to parent elements and uses the standard DOM APIs for creating, dispatching, and listening for events. The annotated event listeners are used by Polymer, which defines the event listeners as small chunks of DOM template and can be added to DOM children…

  • Shadow DOM and Styling

    Shadow DOM is a new property of DOM used for building components. Example In the following code, the header component includes page title and menu button. Shadow DOM allows locating the children in a scoped subtree, which is known as shadow tree. The shadow-root root is called as the top of shadow tree and the element…

  • Custom Elements

    Polymer is a framework that allows creating custom elements using standard HTML elements. Custom web elements provide the following features − You can define the custom element using ES6 class and class can be associated with the custom element as shown in the following code. The custom element can be used as a standard element…

  • Elements

    Polymer elements are a set of visual and non-visual elements designed to work with the layout, user interaction, selection, and scaffolding applications. These include everything from a simple button to a dialog box with neat visual effects. The following table shows different types of polymer elements. Sr.No. Types & Description 1 app elementsThe app elements…

  • Installation

    It’s easy to configure Polymer in your system. Following are the two ways to install Polymer. Installing Polymer Using Polymer CLI Step 1 − Install Polymer using the following npm command. Step 2 − Check the successful installation and version using the following command. If it has installed successfully, then it will show the version as −…

  • Overview

    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. The stable release is 1.7.0 and it was released on September 29, 2016. Why Use Polymer.js? Features of…

  • Tutorial

    Polymer.js is a JavaScript library created by Google that allows reusing the HTML elements for building applications with components. This tutorial covers most of the topics required for a basic understanding of Polymer.js and to get a feel of how it works. Audience This tutorial is designed for software programmers who want to learn the…

  • Examples

    Till now, we have learnt many concepts in MomentJS. This chapter gives you further examples for a better understanding. Display Date Range Between Two Dates This is an example which displays the dates between two given dates. We want to display all the dates between 2014-05-01 to 2014-05-16. We have used date query isSameOrAfter, date addition and date format to…

  • Plugins

    Plugins are extended features added on MomentJS. MomentJS is an open source project and many plugins are found in MomentJS which are contributed by its users and available using Node.js and GitHub. This chapter discusses some of the calendars plugins and date formats plugins available in MomentJS. Calendar Plugins This section discusses two types of…

  • Utilities

    In MomentJS, you can change or customize the output as per the requirement using normalize units and invalid methods. You can also set your own custom validation on the moment object. Observe the following table for more information − Sr.No. Method & Syntax 1 Normalize Unitsmoment.normalizeUnits(String); 2 Invalidmoment.invalid(Object);