Adding an element to a different document changes the constructor
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: firefox, Unassigned)
Details
Attachments
(1 file)
998 bytes,
text/html
|
Details |
Steps to reproduce:
- Open the inspector console
- Open the attached html file
The sample html file creates a video element in an about:blank iframe and then appends the video to the body of the main frame. When the element changes documents, Firefox changes the video's constructor to the HTMLVideoElement associated with the main frame rather than the iframe. This differs from Chrome and Safari, which preserve the element's original constructor.
This behavior is not specific to videos; itoccurs with any element type.
I don't know whether this is technically a bug. Perhaps it's undefined behavior by the HTML spec? It's certainly an inconsistency between the web browsers.
Actual results:
top constructor? false
iframe constructor? true
top constructor? false
iframe constructor? true
Expected results:
top constructor? false
iframe constructor? true
top constructor? true
iframe constructor? false
Comment 1•6 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Reporter | ||
Updated•6 months ago
|
Comment 2•6 months ago
|
||
Unfortunately, this is a known issue, dating back to before this behaviour had been specified.
Description
•