When I think of web components, I normally think of creating new UI elements. But I think one of the more intriguing things that is possible with them is the ability to create UI-less features that simply serve as a convenient way to get access to streams of information. Instead of creating JavaScript objects that receive AJAX responses, create a Polymer element that does and then bubbles events in the document like an HTML element.
To explore the idea, I am going to try to create a JavaScript Polymer element that listens for click events on a web page. I start with the usual <script> setup and a custom <click-sink> element in the body...
Your new post is loading...