Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed May 9, 2024
1 parent 2856ce3 commit b326e4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/get-browser-globals.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,13 @@ async function runInAudioWorklet(function_) {
`;

return runInBrowser(async workletCode => {
// eslint-disable-next-line no-undef -- execute in browser
const context = new AudioContext();
const workletUrl = URL.createObjectURL(new Blob([workletCode], {type: 'application/javascript'}));
await context.audioWorklet.addModule(workletUrl);
URL.revokeObjectURL(workletUrl);
return new Promise(resolve => {
// eslint-disable-next-line no-undef -- execute in browser
const node = new AudioWorkletNode(context, 'execute-processor');
node.port.onmessage = ({data}) => {

Check failure on line 188 in scripts/get-browser-globals.mjs

View workflow job for this annotation

GitHub Actions / Node.js 20

Prefer `addEventListener` over `onmessage`. Note that there is difference between `SharedWorker#onmessage` and `SharedWorker#addEventListener('message')`.

Check failure on line 188 in scripts/get-browser-globals.mjs

View workflow job for this annotation

GitHub Actions / Node.js 18

Prefer `addEventListener` over `onmessage`. Note that there is difference between `SharedWorker#onmessage` and `SharedWorker#addEventListener('message')`.
resolve(data);
Expand Down

0 comments on commit b326e4b

Please sign in to comment.