Element View
It's view layer to HTMLElement, that responsible for Event Handling.
Example of use
Form block:
View class:
{ return mouseenter: this_onMouseEnter '.form__text': input: this_onInputText '.form__choice': change: this_onChangeChoice ; } { // ... } { // ... } { // ... }
Initiate view:
document;
Web Component example
Template:
Custom element:
PolymerElement static { return 'custom-form'; } { return '.form__text': input: this_onInputText '.form__choice': change: this_onChangeChoice ; } { // ... } { // ... } windowcustomElements;
Element usage:
Creating and triggering events
It's native feature. See MDN guide.