Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Commit

Permalink
fix: height issue
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Jun 7, 2022
1 parent f4e530c commit 19e1c60
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/wistia-video-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { loadScript, promisify, PublicPromise } from './utils.js';

const templateLightDOM = document.createElement('template');
templateLightDOM.innerHTML = `
<style class="wistia_style">
.wistia_embed {
height: 100%;
}
</style>
<div class="wistia_embed"></div>
`;

Expand Down Expand Up @@ -48,6 +53,7 @@ class WistiaVideoElement extends SuperVideoElement {
};

// Sadly the setup/render will not work in the shadow DOM.
this.querySelector('.wistia_style')?.remove();
this.querySelector('.wistia_embed')?.remove();
this.append(templateLightDOM.content.cloneNode(true));

Expand Down

0 comments on commit 19e1c60

Please sign in to comment.