Joe Pea

Results 1897 comments of Joe Pea

Hello Matthew, I've stumbled back here thinking about if I need this sort of thing again. The reason is, if I am making a custom element, and the custom element...

Oops, realized I changed the wrong file. Let me edit...

I need to circle back to this! Putting it on my Todo list this time.

As user of the lib, I can achieve what I want by writing ```js customAttributes.define( 'has', HasAttribute ) if (Element.prototype.attachShadow) { const _attachShadow = Element.prototype.attachShadow Element.prototype.attachShadow = function(...args) { const...

In my above example, it assumes that custom attributes are all defined before any shadow roots are created. That's the simple case which the above technique handles just fine, but...

@Elvynia Interesting approach. On the other hand, imagine a custom attribute that is designed to work on any element, anywhere in the DOM, without having any idea which shadow roots...

Wait, for the star it seems like it's just my terminal's antialias related setting... but what's up with the pile of crap?