Since #11 it's been the responsibility of plugins to embed their content into an area that possibly already contains media. This is so that plugins can re-use flash or iFrame embeds rather than spending time creating new ones.
The GifvPlugin is silly and appends itself to the wrapper, meaning any content from a previous embed remains. This can lead to towers of dickbutt gifs, or worse. Offending code:
wrapper[0].appendChild(video);
While I could set the innerHTML as video that would cause the video element (and its source children) to be re-parsed and loose all their important event handlers and state.
Since #11 it's been the responsibility of plugins to embed their content into an area that possibly already contains media. This is so that plugins can re-use flash or iFrame embeds rather than spending time creating new ones.
The GifvPlugin is silly and appends itself to the wrapper, meaning any content from a previous embed remains. This can lead to towers of dickbutt gifs, or worse. Offending code:
wrapper[0].appendChild(video);
Solution:
While I could set the innerHTML as video that would cause the video element (and its source children) to be re-parsed and loose all their important event handlers and state.