Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added configurable property to elements for re-use #2489

Merged
merged 1 commit into from
Sep 9, 2022
Merged

Added configurable property to elements for re-use #2489

merged 1 commit into from
Sep 9, 2022

Conversation

NoirHusky
Copy link
Contributor

Apparently, if you make a Plyr instance with custom elements. Plyr declares some of the properties in the element as non-configurable. So, if you want to destroy that Plyr instance and instantiate it again, Javascript complains of redefining a non-configurable property 'pressed'. This happens only when the custom elements are an object and not a strings btw.

Link to related issue (if applicable)

No, issue precisely about this was opened.

Summary of proposed changes

One line was added to make 'pressed' property configurable.

Copy link
Owner

@sampotts sampotts left a comment

Choose a reason for hiding this comment

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

Thanks! Sorry for the delay on this. I'll get a release out this weekend with this in.

@sampotts sampotts merged commit ebda039 into sampotts:master Sep 9, 2022
adeeb1 pushed a commit to ClassHook/plyr that referenced this pull request Oct 11, 2022
adeeb1 added a commit to ClassHook/plyr that referenced this pull request Oct 13, 2022
* Fix typo.

* remove redundant local variable (sampotts#2467)

* fix invalid CSS @charset rule (sampotts#2466)

* remove deprecated keyCode (sampotts#2461)

* remove deprecated keyCode (sampotts#2463)

* fix: use consistent border-radius variable

* fix JSDoc comments (sampotts#2468)

* feat: minor tweaks to the preview thumbs UI

* Improve accessibility on control buttons with aria-pressed (sampotts#2523)

* Added configurable property to elements for re-use (sampotts#2489)

* navigator.platform is deprecated (sampotts#2530)

I'm submitting a little update for browser detection:

1. `navigator.platform` is deprecated - it's prefered to use `navigator.userAgent` https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform
2. No need for the brackets in the RegEx - you can test this on https://regex101.com

And that's about it. Maybe I missed the point, do let me know! ❤️

* fix: add babel plugin to transform optional chaining

* Update dist files.

Co-authored-by: Hashen <[email protected]>
Co-authored-by: Sam Potts <[email protected]>
Co-authored-by: Emil Karlsson <[email protected]>
Co-authored-by: NoirHusky <[email protected]>
Co-authored-by: Nikola Stamatović <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants