Skip to content

Instantly share code, notes, and snippets.

@KonnorRogers
Created July 8, 2024 16:28
Show Gist options
  • Save KonnorRogers/1ecde9905469b88ea24e8790c85df1d6 to your computer and use it in GitHub Desktop.
Save KonnorRogers/1ecde9905469b88ea24e8790c85df1d6 to your computer and use it in GitHub Desktop.
if (typeof ResizeObserver === "undefined") {
globalThis.ResizeObserver = class {
// eslint-disable-next-line
constructor (..._args: ConstructorParameters<typeof ResizeObserver>) {}
// eslint-disable-next-line
observe (..._args: Parameters<ResizeObserver["observe"]>) {}
// eslint-disable-next-line
unobserve (..._args: Parameters<ResizeObserver["unobserve"]>) {}
// eslint-disable-next-line
disconnect (..._args: Parameters<ResizeObserver["disconnect"]>) {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment