Skip to content

Commit

Permalink
feat: continuously try to show external window
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmader committed Nov 20, 2020
1 parent d7e2a39 commit 0832c94
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/btn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ export class BtnList {
const observer = new MutationObserver(() => {
// check if the buttons are still in document when dom updates
if (!document.contains(el)) {
try {
this.getBtnParent()
} catch {
observer.disconnect()
this.commit(BtnListMode.ExtWindow)
}

// re-commit
// performance issue?
el = this._commit()
Expand Down

0 comments on commit 0832c94

Please sign in to comment.