This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html Section: http://www.whatwg.org/specs/web-apps/current-work/#the-video-element Comment: Warn about the perils of registering event handlers after <video> Posted from: 83.218.67.122 User agent: Opera/9.80 (X11; Linux x86_64; U; Opera Next; en) Presto/2.8.131 Version/11.50
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-May/031608.html https://github.com/remy/html5demos/issues/12 The spec should advice authors about the safe methods of attaching event handlers on at least <audio>, <video> and <img>. (Given that such advice will be ignored, I would prefer a proper fix, but I have no concrete such fix to suggest.)
What exactly do you think the spec should say, and where?
In the "Best practices for authors using media elements" section, there should be a short example with a <video> tag followed directly by a <script> tag adding event handlers. It should be explained why the code is racy and other ways of doing it correctly should be suggested. Do you need more detail, or can you make something up?
mass-moved component to LC1
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Partially Accepted Change Description: see diff given below Rationale: I didn't put it in the video section because it's a general problem, and I didn't use <video> to illustrate it because it's more complicated than necessary to show the problem. But I added a section that shows how to write good code here to avoid this mistake.
Checked in as WHATWG revision r6421. Check-in comment: An intro section on avoiding common pitfalls with scripts. File bugs if you have ideas of other things to mention here. http://html5.org/tools/web-apps-tracker?from=6420&to=6421
Thanks, I guess that's about as much as we can do.