5 ms·
This is a wrapper around the DOM API, nothing like jquery at all.
by jiggy2011 13y ago
This is a wrapper around the DOM API, nothing like jquery at all.
- coldtea 13y agoYou know that jQuery is primarily a "wrapper around the DOM API", right?
- jiggy2011 13y agoNot exactly, jquery offers it's own API which is what makes it powerful and allows for it's method chaining, plugin system etc. A $(".className") returns a jquery object , not a DOM element.
- coldtea 13y ago>Not exactly, jquery offers it's own API Yes, that's the definition of a wrapper: it offers it's own API.
- jiggy2011 13y agojquery is really it's own abstraction, the jquery API allows you to interact with jquery objects which can do DOM manipulation on your behalf. This library literally returns DOM objects.
- esailija 13y agojQuery API is nothing like the DOM API. This library is a list of functions that are nothing but proxies for some other functions which you might as well call directly. Given that the author has written this http://zedshaw.com/essays/indirection_is_not_abstraction.html http://zedshaw.com/essays/indirection_is_not_abstraction.htm... I am sure this is some kind of joke...
- coldtea 13y ago>jQuery API is nothing like the DOM API. That's the whole point of making a wrapper around an API. That it doesn't look like the API you're wrapping.