Hacker News new | ask | show | jobs
by Groxx 5362 days ago
Why do so many JS mini-libraries expect an ID or a CSS selector? Why not accept an element too, which lets you augment anything? Seriously, you're just crippling your library, and adding complexity by not accepting elements.
1 comments

Good idea! The id-parameter could absolutely be a element instead, will add that to next release.

But one point with only allowing id i.e is consistency.