Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.




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

Search: