polyfills: remove web-animations-js
All checks were successful
/ depoly (push) Successful in 1m25s

This commit is contained in:
thislight 2024-11-19 17:17:56 +08:00
parent 4190b8847d
commit 33fab7e655
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
3 changed files with 1 additions and 9 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -55,7 +55,6 @@
"solid-js": "^1.9.3",
"solid-styled": "^0.11.1",
"stacktrace-js": "^2.0.2",
"web-animations-js": "^2.3.2",
"workbox-core": "^7.3.0",
"workbox-precaching": "^7.3.0"
},

View file

@ -1,14 +1,7 @@
//! This module has side effect.
//! It recommended to include the module by <script> tag.
if (typeof document.body.animate === "undefined") {
// @ts-ignore: this file is polyfill, no exposed decls
import("web-animations-js").then(() => {
// all target platforms supported, prepared to remove
console.warn("web animation polyfill is included");
});
}
if (typeof window.crypto.randomUUID === "undefined") {
// TODO: this polyfill can be removed in 2.0, see https://code.lightstands.xyz/Rubicon/tutu/issues/36
// Chrome/Edge 92+
// https://stackoverflow.com/a/2117523/2800218
// LICENSE: https://creativecommons.org/licenses/by-sa/4.0/legalcode