News for hackers. Stuff that matters.
Re:Show HN: CalDOM: An agnostic, reactive and minimalist Jav... by dumindaxsb on Monday July 19, 2021 @10:45PM (#27889578)
Thank you. Worked really hard on the benchmark :)

No, it's not synced. When you use CalDOM without its reactive features, it's just a wrapper around the native DOM Element (similar to jQuery).

_("button").elem === document.querySelectorAll("button")[0]

Regarding capturing events of future elements: You can achieve this by setting an event listener to the parent.

Eg:

_("body").on("click", e => { if( e.target.matches("button") ) //Do something });

There are no comments on this comment yet.