←back to thread

11 points asika32764 | 1 comments | | HN request time: 0.202s | source

A library to implement directive pattern for native HTML without any framework, which is inspired by Vue.js.
1. mock-possum ◴[] No.45636427[source]
This looks kinda neat - I’m not really sure I have a good sense of what I would use this for though.

If I’m working in vanilla js, I don’t really have any issues when using element selectors - deferred or otherwise.

If I’m working in an app framework, then that framework already provides this functionality - for instance Lit lets you bind event listeners to elements as defined in your templates @event-name=${this.onEventName}

I guess - is the aim with this, that it’s useful for if you’re working outside the context of a specific site or project, and aiming to write code for an npm package or similar, where you need something portable and framework-independent? I suppose I could see reaching for it in that case.