refactor: replace .forEach() with for-of (#39691)

* refactor: replace `.forEach()` with `for-of`

* refactor docs/fiddles/features/web-hid/renderer.js
This commit is contained in:
Milan Burda 2023-08-31 16:36:43 +02:00 committed by GitHub
parent 7858921a1f
commit 0b0707145b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 144 additions and 132 deletions

View file

@ -929,7 +929,7 @@ describe('<webview> tag', function () {
});
afterEach(async () => {
await w.executeJavaScript(`{
document.querySelectorAll('webview').forEach(el => el.remove())
for (const el of document.querySelectorAll('webview')) el.remove();
}`);
});
after(closeAllWindows);
@ -1411,7 +1411,7 @@ describe('<webview> tag', function () {
});
afterEach(async () => {
await w.executeJavaScript(`{
document.querySelectorAll('webview').forEach(el => el.remove())
for (const el of document.querySelectorAll('webview')) el.remove();
}`);
});
after(closeAllWindows);
@ -1791,7 +1791,7 @@ describe('<webview> tag', function () {
});
afterEach(async () => {
await w.executeJavaScript(`{
document.querySelectorAll('webview').forEach(el => el.remove())
for (const el of document.querySelectorAll('webview')) el.remove();
}`);
});
after(closeAllWindows);
@ -2088,7 +2088,7 @@ describe('<webview> tag', function () {
});
afterEach(async () => {
await w.executeJavaScript(`{
document.querySelectorAll('webview').forEach(el => el.remove())
for (const el of document.querySelectorAll('webview')) el.remove();
}`);
});
after(closeAllWindows);