Skip to content

Commit 903671d

Browse files
committed
Update README.
`navigator` was added in node 21 so some of the examples in the readme were out of date.
1 parent d92a1a3 commit 903671d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ the object returned by `create`. As such, if you assign it to a global
9898
variable like this
9999

100100
```js
101-
globalThis.navigator = { gpu: create([]) };
101+
globalThis.navigator.gpu = create([]);
102102
```
103103

104104
node will not exit because it's still running GPU code in the background.
105105
You can fix that by removing the reference.
106106

107107
```js
108-
delete globalThis.navigator
108+
delete globalThis.navigator.gpu
109109
```
110110

111111
See: https://issues.chromium.org/issues/387965810

0 commit comments

Comments
 (0)