Remove dialog elements on dispose() by VanessaPhippsCfa · Pull Request #730 · ableplayer/ableplayer

Description

player.dispose() now also removes the instance's dialog elements from <body>.

Partial fix for #658 . There are still too many dialogs for multiple players on a page, but this at least prevents the list from growing with every add/remove cycle.

How Has This Been Tested?

Clicked around /demos/external6.html and kept a close eye on the "Elements" tab in the dev console. On https://ableplayer.github.io/ableplayer/demos/external6.html you can see the modals proliferating. After this change, the extra elements disappear when the players do.

Screenshots (jpeg or gifs if applicable):

Before:

image

After:

image

Types of changes

Bug fix. It's possible someone was relying on these modals sticking around, but, seems unlikely.

Checklist:

  • My code is tested.
  • My code has proper inline documentation.