Merge pull request #16580 from Snuffleupagus/rm-OverlayManager-unregister

Remove the `OverlayManager.unregister` method since it's completely unused
This commit is contained in:
Jonas Jenwald 2023-06-21 13:23:07 +02:00 committed by GitHub
commit 71c60d523d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
* @returns {Promise} A promise that is resolved when the overlay has been