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

feat: add isDisposed method to components #6099

Merged
merged 4 commits into from
Aug 29, 2019
Merged

feat: add isDisposed method to components #6099

merged 4 commits into from
Aug 29, 2019

Conversation

misteroneill
Copy link
Member

Description

Usually, when we need to check if a component (or player) has been disposed, we check if its element exists:

if (player.el()) {
  // Do something...
}

It would be clearer if we had a method for that:

if (!player.isDisposed()) {
  // Do something...
}

Specific Changes proposed

  • Add isDisposed method to the base component.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
  • Reviewed by Two Core Contributors

@gkatsev gkatsev added the minor This PR can be added to a minor release. It should not be added to a patch release. label Jul 29, 2019
src/js/component.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed minor This PR can be added to a minor release. It should not be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants