migrate angular 21 finalize

This commit is contained in:
2026-03-09 22:56:31 +01:00
parent 26c99a0dae
commit bb08e46b0c
63 changed files with 738 additions and 783 deletions

View File

@@ -6,12 +6,9 @@ export const openFullscreen = () => {
}
try {
const promise = elem.requestFullscreen();
if (promise && typeof promise.catch === 'function') {
void promise.catch(() => {
// Browser may reject when no user gesture is present. Keep app usable.
});
}
void elem.requestFullscreen().catch(() => {
// Browser may reject when no user gesture is present. Keep app usable.
});
} catch {
// Some browsers may throw synchronously if fullscreen is not allowed.
}
@@ -19,11 +16,8 @@ export const openFullscreen = () => {
export const closeFullscreen = () => {
if (document.exitFullscreen) {
const promise = document.exitFullscreen();
if (promise && typeof promise.catch === 'function') {
void promise.catch(() => {
// Ignore; leaving fullscreen is a best-effort action.
});
}
void document.exitFullscreen().catch(() => {
// Ignore; leaving fullscreen is a best-effort action.
});
}
};