Repeatedly in the spec, we're told to "queue a media element task" to do something. However, that algorithm in the HTML spec requires a media element:
To queue a media element task with a media element element and a series of steps steps, queue an element task on the media element's media element event task source given element and steps.
None of the callers seem to pass a media element here, or in fact, even have one available.
This was changed in #2307 which was a few years ago, perhaps the HTML algorithm didn't require an element then, just a task source?
Specifically we need the element to then call "queue an element task", which uses the element's relevant global object:
To queue an element task on a task source source, with an element element and a series of steps steps:
- Let global be element's relevant global object.
- Queue a global task given source, global, and steps.
You could also argue this is an HTML spec issue, the problem is with the two specs not agreeing here. However, the HTML spec calls this algorithm a lot, and does make use of the media element parameter.
Repeatedly in the spec, we're told to "queue a media element task" to do something. However, that algorithm in the HTML spec requires a media element:
None of the callers seem to pass a media element here, or in fact, even have one available.
This was changed in #2307 which was a few years ago, perhaps the HTML algorithm didn't require an element then, just a task source?
Specifically we need the element to then call "queue an element task", which uses the element's relevant global object:
You could also argue this is an HTML spec issue, the problem is with the two specs not agreeing here. However, the HTML spec calls this algorithm a lot, and does make use of the media element parameter.