YouTube Wrapper's property points at document



5 years ago
2 years ago


(Reporter: markp, Assigned: thecount)





5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36

Steps to reproduce:

Created an event listener on the YouTube wrapper element and was using the to look at the currentTime.

NB: The events generated by a video element have the event object with the target property pointing at the video element.

Actual results:

The points at the root of the document

Expected results:

It should point at the YouTube wrapper element, thus enabling the following within the event:


5 years ago
Assignee: nobody → scott

Comment 1

5 years ago
Not only does the point to the document, the event handler's context (this) points to the document too.

For example, usually in a video element event handler you could do the following to access the element's properties:

Comment 2

5 years ago
The points at the DOM element the YouTube wrapper was instance on.

Comment 3

5 years ago
After reviewing Custom Events this one is a little tricky... After all, usually the <video> element in the DOM is the event emitter and also the context of "this" and the While the YouTube wrapper is a JavaScript object that is dispatching a custom event on the DOM element used to embed the YouTube video.

The best that could be done would be:
* "this" points at the DOM element of the YouTube wrapper
* points at the DOM element of the YouTube wrapper
* points at the YouTube Wrapper instance
We're deprecating the Webmaker Product on Bugzilla, so I'm marking this as resolved:incomplete

If this issue needs to be reopened, you can file it at
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.