test
parent
0f5e87e130
commit
431a877361
|
@ -31,7 +31,7 @@
|
|||
this.currentVariant = id;
|
||||
|
||||
// edit inner html
|
||||
this.shadowRoot.innerHTML = `<div>Current variant: ${this.currentVariant}</div>`;
|
||||
this.innerHTML = `<div>Current variant: ${this.currentVariant}</div>`;
|
||||
|
||||
document.querySelectorAll('[thumbnail-alt-mobile]').forEach((thumbnail) => {
|
||||
console.log(thumbnail.getAttribute('thumbnail-alt-mobile'));
|
||||
|
@ -42,10 +42,10 @@
|
|||
|
||||
// clone video to shadow dom
|
||||
let videoClone = video.cloneNode(true);
|
||||
this.shadowRoot.appendChild(videoClone);
|
||||
this.appendChild(videoClone);
|
||||
|
||||
// get video element
|
||||
let videoElement = this.shadowRoot.querySelector('.shx-video');
|
||||
let videoElement = this.querySelector('.shx-video');
|
||||
videoElement.classList.add('shx-video-for-desc');
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue