Hacker Newsnew | past | comments | ask | show | jobs | submit | rasso's commentslogin

For what it's worth: they live up to their own standards. Here, for example, is the source code that powers their VIP platform product:

https://github.com/Automattic/vip-go-mu-plugins

It must be open sourced because it's based on WordPress. I still love that.


This is my all-time favourite from Shatner: "It hasn't happened yet"

https://youtu.be/7GnoLJIIS4w?si=zP_mlOxV1tKMMkQx


See my other comment: you can set default styles using

:where(:not(:defined)) { display: block }


simply only ever use this to replace <span> or <div>


Beware that connectedCallback runs _every time_ a custom element is added to the dom. So you should make sure to only add event listeners once by tracking internally if the element was already initialized.


Thanks, that's good to know. In some contexts I don't think a custom element is ever added to the DOM more than once, eg in htmx I am responding with HTML markup which is then injected into the page and then just kept there, possibly 'forever' or at least until it is replaced by some new markup from a new response.


This is how you can set default styles for all your custom elements:

    :where(:not(:defined)) {
         display: block;
    }


Amazing, I was literally just trying to see if I could figure out how to do this. Thanks!


Amazing, thanks! Didn't know this one yet :)


Absolutely, me too!! AS3 was a beautiful language.


It‘s not by the vite team.



Oh my… thanks for the research and sorry for my lazy assumption!


Beautiful! If you could find a way to connect this to Music for Programming [0], that would be awesome.

[0] https://musicforprogramming.net/latest/


Good idea. I don’t know how to hook it up exactly, but I can add this type of music.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: