Remove setImmediate polyfill (#27567)

This commit is contained in:
Michael Telatynski 2024-06-13 16:59:56 +01:00 committed by GitHub
parent 5442d4050d
commit ea16928d35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 6 deletions

View file

@ -191,7 +191,6 @@
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"rimraf": "^5.0.0", "rimraf": "^5.0.0",
"semver": "^7.5.2", "semver": "^7.5.2",
"setimmediate": "^1.0.5",
"string-replace-loader": "3", "string-replace-loader": "3",
"style-loader": "4", "style-loader": "4",
"stylelint": "^16.1.0", "stylelint": "^16.1.0",

View file

@ -194,9 +194,9 @@ export default class Favicon {
} }
private setIcon(canvas: HTMLCanvasElement): void { private setIcon(canvas: HTMLCanvasElement): void {
setImmediate(() => { setTimeout(() => {
this.setIconSrc(canvas.toDataURL("image/png")); this.setIconSrc(canvas.toDataURL("image/png"));
}); }, 0);
} }
private setIconSrc(url: string): void { private setIconSrc(url: string): void {

View file

@ -25,9 +25,6 @@ import { extractErrorMessageFromError } from "matrix-react-sdk/src/components/vi
import { parseQsFromFragment } from "./url_utils"; import { parseQsFromFragment } from "./url_utils";
import "./modernizr"; import "./modernizr";
// Make setImmediate available in bundle
import "setimmediate";
// Require common CSS here; this will make webpack process it into bundle.css. // Require common CSS here; this will make webpack process it into bundle.css.
// Our own CSS (which is themed) is imported via separate webpack entry points // Our own CSS (which is themed) is imported via separate webpack entry points
// in webpack.config.js // in webpack.config.js