Commit df0aaf0 1 parent 6624a36 commit df0aaf0 Copy full SHA for df0aaf0
File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { firefox } from "npm:[email protected] " ;
2
2
3
3
async function main ( ) {
4
- await using browser = await firefox . launch ( {
4
+ const browser = await firefox . launch ( {
5
5
headless : true ,
6
6
args : [
7
7
"--no-sandbox" ,
@@ -11,7 +11,7 @@ async function main() {
11
11
"media.hardware-video-decoding.enabled" : false ,
12
12
} ,
13
13
} ) ;
14
- await using page = await browser . newPage ( ) ;
14
+ const page = await browser . newPage ( ) ;
15
15
await page . goto ( "https://example.com" ) ;
16
16
const title = await page . title ( ) ;
17
17
console . log ( `title: ${ title } ` ) ;
Original file line number Diff line number Diff line change 1
1
import { chromium } from "npm:[email protected] " ;
2
2
3
3
async function main ( ) {
4
- await using browser = await chromium . launch ( {
4
+ const browser = await chromium . launch ( {
5
5
headless : true ,
6
6
args : [
7
7
"--no-sandbox" ,
@@ -13,7 +13,7 @@ async function main() {
13
13
"--disable-features=VizDisplayCompositor" ,
14
14
] ,
15
15
} ) ;
16
- await using page = await browser . newPage ( ) ;
16
+ const page = await browser . newPage ( ) ;
17
17
await page . goto ( "https://example.com" ) ;
18
18
const title = await page . title ( ) ;
19
19
console . log ( `title: ${ title } ` ) ;
You can’t perform that action at this time.
0 commit comments