Skip to content

Commit df0aaf0

Browse files
committed
not use await using
1 parent 6624a36 commit df0aaf0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

firefox.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { firefox } from "npm:[email protected]";
22

33
async function main() {
4-
await using browser = await firefox.launch({
4+
const browser = await firefox.launch({
55
headless: true,
66
args: [
77
"--no-sandbox",
@@ -11,7 +11,7 @@ async function main() {
1111
"media.hardware-video-decoding.enabled": false,
1212
},
1313
});
14-
await using page = await browser.newPage();
14+
const page = await browser.newPage();
1515
await page.goto("https://example.com");
1616
const title = await page.title();
1717
console.log(`title: ${title}`);

main.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { chromium } from "npm:[email protected]";
22

33
async function main() {
4-
await using browser = await chromium.launch({
4+
const browser = await chromium.launch({
55
headless: true,
66
args: [
77
"--no-sandbox",
@@ -13,7 +13,7 @@ async function main() {
1313
"--disable-features=VizDisplayCompositor",
1414
],
1515
});
16-
await using page = await browser.newPage();
16+
const page = await browser.newPage();
1717
await page.goto("https://example.com");
1818
const title = await page.title();
1919
console.log(`title: ${title}`);

0 commit comments

Comments
 (0)