Closed
Bug 1110129
Opened 10 years ago
Closed 10 years ago
repetitive appendChild of a <video> to the same element stops the video
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: yury, Unassigned)
References
Details
Attachments
(1 file)
295 bytes,
text/html
|
Details |
I found difference between Firefox and Chrome behavior while fixing the bug 1108796. Looks like Chrome does not perform anything in appendChild if the child element is already in its place in the DOM; e.g. div.appendChild(video); will not stop the video if it is already appended to the div. For comparison, the video stops in Firefox.
Updated•10 years ago
|
Component: DOM: Core & HTML → Video/Audio
Comment 1•10 years ago
|
||
Per spec, div.appendChild(video) must have exactly the same observable behavior as doing these steps:
video.remove();
div.appendChild(video);
Is that not the case in Chrome?
Flags: needinfo?(ydelendik)
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Boris Zbarsky (Vacation Dec 15-31) [:bz] from comment #1)
>
> Is that not the case in Chrome?
It is not. It looks like Chromium is doing if-already-last-child-of optimization [1]. You are right -- the spec does not define this type of optimization. won't fix?
[1] https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/dom/ContainerNode.cpp&rcl=1418267803&l=693
Comment 3•10 years ago
|
||
That blink behavior is totally nuts. Please file a chromium bug.
Comment 4•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(ydelendik)
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•