File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class SiteVideo {
100100
101101 if ( motion_reduced ) this . _onStopComplete ( { target : this . bg , propertyName : 'opacity' } ) ;
102102 }
103- oembed ( script ) {
103+ oembed ( template ) {
104104 // remove video from DOM
105105 if ( this . _mode === MODE_INLINE ) this . video . remove ( ) ;
106106
@@ -111,8 +111,11 @@ class SiteVideo {
111111 this . emitter . emit ( 'SiteScroll.stop' , true ) ;
112112 this . emitter . emit ( 'Video.pauseAll' ) ;
113113
114- // inject iframe into DOM
115- this . videoWrap . innerHTML = script . innerHTML ;
114+ // empty DOM element
115+ removeAllChilds ( this . videoWrap ) ;
116+
117+ // inject iframe into DOM element
118+ this . videoWrap . appendChild ( template . content . cloneNode ( true ) ) ;
116119
117120 // make sure ANIMATE_OUT is removed
118121 this . el . classList . remove ( ANIMATE_OUT_CLASSNAME ) ;
You can’t perform that action at this time.
0 commit comments