Questions tagged [custom-element]

Custom Elements are a feature of HTML that provide a way for you to build your own fully-featured DOM elements and use them in your HTML markup, CSS stylesheets, and JavaScript code

Custom Elements are natively supported in all browsers, but for browsers that don’t yet implement them natively, some support is available through the use of a JavaScript polyfill.

Latest changes in Javascript / Ecmascript 2017, allow you to easily create HTML custom elements in an OOP like fashion that makes your code clear and your HTML mark-up more intuitive.

See also:

For a gallery of available custom elements check out WebComponents

973 questions
13
votes
2 answers

Vanilla Web Component custom event attributes and properties

Using Web Components without any framework, what is the proper way to implement a custom event? For example, say I have a custom element x-pop-out that has a custom event of pop I would want all of the following to work:
hapticdata
  • 1,661
  • 1
  • 12
  • 11
13
votes
3 answers

Polymer 1.0: Two-way bindings with input elements

Code Consider the following Polymer custom element: