TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

JQuery should be part of the browser.

7 点作者 namanaggarwal将近 11 年前

4 条评论

nailer将近 11 年前
The article is obviously ridiculous (CDNs handle fetches, DOM APIs do most of what jQuery does except in-built iteration, jQuery&#x27;s AJAX is poor, v2 is the current major version, we use CSS for most animations these days, etc) but:<p><pre><code> NodeList.prototype.forEach = Array.prototype.forEach; var query = document.querySelector.bind(document), queryAll = document.querySelectorAll.bind(document) </code></pre> And patching in `classlist.js` for IE9 just to get the basics going out of the box on modern browsers does suck. And yes, I write big things in vanilla JS.
nandhp将近 11 年前
If using a CDN, the refresh tax and initial tax should be negligible -- Google&#x27;s jQuery has a 1-year expiration date; code.jquery.com has an expiration date in 2037. Browsers shouldn&#x27;t be re-checking them unless an explicit &quot;reload&quot; is used.<p>Yes, there&#x27;s a constant tax for parsing, etc. But that can be better fixed by having browsers add general support for caching compiled versions of JavaScript libraries. This way, even sites that use less famous libraries (Dojo or AngularJS or whatever) can get the same benefits.
jehna1将近 11 年前
<a href="http://youmightnotneedjquery.com/" rel="nofollow">http:&#x2F;&#x2F;youmightnotneedjquery.com&#x2F;</a>
stephenr将近 11 年前
&gt; It is something that has arguably become a part of javascript itself.<p>No, it hasn&#x27;t<p>&gt; Whenever, I am creating even a simple website, I include jQuery to it (even if sometime I don&#x27;t need&#x2F;use it).<p>Then you are an idiot.
评论 #7925554 未加载