Merge pull request #16580 from Snuffleupagus/rm-OverlayManager-unregister
Remove the `OverlayManager.unregister` method since it's completely unused
This commit is contained in:
commit
71c60d523d
@ -42,20 +42,6 @@ class OverlayManager {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {HTMLDialogElement} dialog - The overlay's DOM element.
|
|
||||||
* @returns {Promise} A promise that is resolved when the overlay has been
|
|
||||||
* unregistered.
|
|
||||||
*/
|
|
||||||
async unregister(dialog) {
|
|
||||||
if (!this.#overlays.has(dialog)) {
|
|
||||||
throw new Error("The overlay does not exist.");
|
|
||||||
} else if (this.#active === dialog) {
|
|
||||||
throw new Error("The overlay cannot be removed while it is active.");
|
|
||||||
}
|
|
||||||
this.#overlays.delete(dialog);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {HTMLDialogElement} dialog - The overlay's DOM element.
|
* @param {HTMLDialogElement} dialog - The overlay's DOM element.
|
||||||
* @returns {Promise} A promise that is resolved when the overlay has been
|
* @returns {Promise} A promise that is resolved when the overlay has been
|
||||||
|
Loading…
x
Reference in New Issue
Block a user