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

Commit

Permalink
fix: use toggleAttribute()
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Apr 1, 2023
1 parent 78250ea commit cda8c32
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions wistia-video-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,7 @@ class WistiaVideoElement extends SuperVideoElement {

set controls(val) {
if (this.controls == val) return;

if (val) {
this.setAttribute('controls', '');
} else {
// Remove boolean attribute if false, 0, '', null, undefined.
this.removeAttribute('controls');
}
this.toggleAttribute('controls', Boolean(val));
}
}

Expand Down

1 comment on commit cda8c32

@vercel
Copy link

@vercel vercel bot commented on cda8c32 Apr 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wistia-video-element – ./

wistia-video-element-git-main-luwes.vercel.app
wistia-video-element-luwes.vercel.app
wistia-video-element.vercel.app

Please sign in to comment.