27 ms·
jQuery was invented for basically two reasons, neither of them about making JavaScript suck less. 1. Introduce a "chaining" API. 2. Paper over the differences
by JimDabell 7y ago
jQuery was invented for basically two reasons, neither of them about making JavaScript suck less.
1. Introduce a "chaining" API.
2. Paper over the differences between how browsers implemented the DOM, with events being the big issue.
Note that the DOM is not JavaScript and JavaScript is not the DOM. The DOM is a language-agnostic API for manipulating markup-based documents.
- tasogare 7y agoThat's nitpicking. Javascript was the only language that could be used to manipulate DOM so it's normal to conflate the two.
- uk_programmer 7y agoWell to nitpick your nitpick. Internet Explorer did allow you to use vbscript to manipulate the DOM. http://www.herongyang.com/VBScript/IE-Browser-DOM-API-Document-Object.html http://www.herongyang.com/VBScript/IE-Browser-DOM-API-Docume... Also you can use XSLT to create a new DOM tree in a browser from an XML document. http://www.informit.com/articles/article.aspx?p=24032&seqNum=9 http://www.informit.com/articles/article.aspx?p=24032&seqNum... EDIT: I forgot about JScript vs JavaScript vs ECMAScript. https://johnresig.com/blog/versions-of-javascript/ https://johnresig.com/blog/versions-of-javascript/ However much of this isn't relevant today.
- nickthemagicman 7y agoSo in other words: 1: to fix js chaining 2: to fix js compatibility Ergo to make js suck less.
- JimDabell 7y agoNo. The first is incoherent, the second ignores half my comment.
- nickthemagicman 7y agoYou're splitting hairs with that half of your comment so I ignored it.