Skip to content

Commit b11023b

Browse files
committed
Remove unused argument from autoResumeAudioContext
This fixes a TODO from 2022.
1 parent a45c791 commit b11023b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/lib/libcore.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,14 +1711,8 @@ addToLibrary({
17111711
// input events on, and registers a context resume() for them. This lets
17121712
// audio work properly in an automatic way, as browsers won't let audio run
17131713
// without user interaction.
1714-
// If @elements is not provided, we default to the document and canvas
1715-
// elements, which handle common use cases.
1716-
// TODO(sbc): Remove seemingly unused elements argument
1717-
$autoResumeAudioContext__docs: '/** @param {Object=} elements */',
1718-
$autoResumeAudioContext: (ctx, elements) => {
1719-
if (!elements) {
1720-
elements = [document, document.getElementById('canvas')];
1721-
}
1714+
$autoResumeAudioContext: (ctx) => {
1715+
var elements = [document, document.getElementById('canvas')];
17221716
['keydown', 'mousedown', 'touchstart'].forEach((event) => {
17231717
elements.forEach((element) => {
17241718
element?.addEventListener(event, () => {

0 commit comments

Comments
 (0)