Skip to content

Commit

Permalink
removeEventListener
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Aug 19, 2024
1 parent 9bd5efb commit b47ce5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ class OptionsSync<UserOptions extends Options> {
if (this._form) {
this._form.removeEventListener('input', this._handleFormInput);
this._form.removeEventListener('submit', this._handleFormSubmit);
this._form.querySelector('.js-export')?.addEventListener('click', this.exportToFile);
this._form.querySelector('.js-import')?.addEventListener('click', this.importFromFile);
this._form.querySelector('.js-export')?.removeEventListener('click', this.exportToFile);
this._form.querySelector('.js-import')?.removeEventListener('click', this.importFromFile);
chrome.storage.onChanged.removeListener(this._handleStorageChangeOnForm);
delete this._form;
}
Expand Down

0 comments on commit b47ce5c

Please sign in to comment.