Closed lavolpecheprogramma closed 1 year ago
Thank you for your kind words!
Indeed it is not possible to pass a single dom element as it is fairly inefficient. I currently have no plans to support that.
It is inefficient precisely because the event listeners have to be set for each DOM element separately, which for my specific use case is a big no-no. The other downside is having to reset the event listeners if the DOM tree is rewritten.
Thanks for your reply :) In a webapp with large form with a lot of input and only one coloris instances it can be a bottleneck, because for every input and click your function will be invoked. i'm not sure that event delegation is better of have two event listeners for each coloris instances but i understand your point of view and if it works better in your use case, it's just fine! thanks a lot for your time!
Hi! I'm watching the codebase, and it seems that it is not possible to pass a dom element to the el property(selector). it can be super useful if you want to use coloris with a framework like vue.
Thanks for your work, coloris have a very nice design!