Skip to content

Commit

Permalink
perf: no need for querySelectorAll, simply iterate over childNodes. S…
Browse files Browse the repository at this point in the history
…aves another 13 Bytes...

[ci skip]
  • Loading branch information
mnater committed Jan 8, 2025
1 parent 9cd8385 commit 430910b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Hyphenopoly_Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ window.Hyphenopoly = {};
});
const testContainer = tester.ap();
if (testContainer) {
testContainer.querySelectorAll("div").forEach((n) => {
testContainer.childNodes.forEach((n) => {
if (checkCSSHyphensSupport(n.style) && n.offsetHeight > 12) {
H.cf.langs.set(n.lang, "CSS");
} else {
Expand Down

0 comments on commit 430910b

Please sign in to comment.