Sync snippet fixes and modernization to all translations
Author: camsongCreated Sep 17, 2026Updated Sep 17, 2026
Labelshelp wanted
#265 fixes broken native snippets and #266 modernizes the guide for evergreen browsers. Both update README.md and README.zh-CN.md only. The other translations still contain code that throws or behaves differently from jQuery.
Help from native speakers is very welcome. One PR per translation keeps review manageable.
Translations to update
-
README.ko-KR.md(한국어) -
README.zh-TW.md(正體中文) -
README-my.md(Bahasa Melayu) -
README-id.md(Bahasa Indonesia) -
README.pt-BR.md(Português) -
README-vi.md(Tiếng Việt) -
README-es.md(Español) -
README-ru.md(Русский) -
README-kg.md(Кыргызча) -
README-tr.md(Türkçe) -
README-it.md(Italiano) -
README-fr.md(Français) -
README-ja.md(日本語) -
README-pl.md(Polski)
Comment below with the file you're taking so work isn't duplicated.
How to do it
- Start from
masterafter #265 and #266 are merged. - Use the English README as the source of truth. See what changed:
git diff c4e00b3 master -- README.mdREADME.zh-CN.mdin the same diff shows how the changes map onto an older translation with a different structure. - Code blocks must match English exactly. Only comments inside code may be translated. Keep the
// jQuery/// Nativelabels. - Translations have drifted: some sections are missing, and variable names differ. Apply the same intent per section. Don't add sections the translation never had unless you want to.
- Run
npm testif you touch anything outside README files (Node.js 22.12+).
What to look for
Bugs (#265). These throw or give wrong results. Please fix them even if you skip the rest:
| Section | Wrong | Right |
|---|---|---|
| 1.5 nextAll / prevAll | loop over nextSibling / previousSibling |
nextElementSibling / previousElementSibling |
| 3.4 / 3.5 append, prepend | ES6 append('<div>…</div>') described as parsing HTML |
strings are inserted as text; use insertAdjacentHTML |
| 3.9 clone | el.cloneNode() |
el.cloneNode(true) |
| 5.3 Trigger | const event inside if/else |
declare once, bubbles: true |
| 6.1 inArray | indexOf(item) > -1 described as returning index |
indexOf(item) returns index |
| 6.1 isPlainObject | typeof obj !== 'object' || obj.nodeType … (throws on null) |
prototype check |
| 6.3 globalEval | $.globaleval |
$.globalEval |
| 6.4 parseHTML | return context.body.children |
Array.from(context.body.childNodes) |
| 7.3 Deferred | const defer = defer() |
rename variable, or Promise.withResolvers() |
| 8.3 fadeOut | `opacity ${ms} ms` |
el.animate(...) (see #266) |
| 8.8 animate | 'all ' + speed |
el.animate(...) (see #266) |
Also check for 'beforebegin ' with a trailing space and .then([a, b] => {}) without parentheses.
Modernization (#266):
- remove IE10 fallbacks
- new sections 4.0–4.0.2, 5.1.1, 5.1.2
- async/await variants
- Web Animations API
- browser support table
Source: camsong/You-Dont-Need-jQuery