mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-27 18:45:48 +02:00
Remove the "abort" listener, on the globalAbortSignal, in the web/sidebar.js file
This is consistent with a bunch of other viewer code, since an `AbortSignal` can only be aborted once any "abort" listeners can thus be removed when invoked.
This commit is contained in:
parent
5ef582fb20
commit
bfa2753f3c
@ -79,7 +79,10 @@ class Sidebar {
|
|||||||
toggleButton.addEventListener("click", this.toggle.bind(this));
|
toggleButton.addEventListener("click", this.toggle.bind(this));
|
||||||
this._isOpen = false;
|
this._isOpen = false;
|
||||||
sidebar.hidden = true;
|
sidebar.hidden = true;
|
||||||
globalAbortSignal?.addEventListener("abort", this.destroy.bind(this));
|
globalAbortSignal?.addEventListener("abort", this.destroy.bind(this), {
|
||||||
|
once: true,
|
||||||
|
});
|
||||||
|
|
||||||
this.#resizeObserver = new ResizeObserver(
|
this.#resizeObserver = new ResizeObserver(
|
||||||
([
|
([
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user