Ideally you want to control the access that widgets have both to your user’s data and to page content. For example you want to remove unvetted access to the DOM and to the global
window object. In this article I’ll describe the approach I’m taking.
I’m sure most of you are familiar with styling DOM elements using CSS selectors. But what if you wanted to create your own stylesheets on the fly or perhaps query or alter existing CSS rules on your page? That’s a little trickier, but also a bit of fun so let’s take a crack at it.
So how do these libraries make this happen and how can you do this with your own functions? Take for example a function that sums a list of numbers.