The kotlin-browser module from kotlin-wrappers provides some "browser APIs missing from the standard library", including ResizeObserver. I noticed that this library has its own, added probably because the ones in kotlin-wrappers were not widely known. And as I read in their docs they seem also to use karakum to generate some Kotlin declarations directly from TypeScript, which saves some manual effort. So I have a maybe immature suggestion to leverage the APIs available in kotlin-wrappers and port the APIs available here but missing there if there are any. In this way, code duplication can be reduced, there is a single source of truth for the APIs, and the APIs become easily maintainable and more widely usable.
The kotlin-browser module from kotlin-wrappers provides some "browser APIs missing from the standard library", including
ResizeObserver. I noticed that this library has its own, added probably because the ones in kotlin-wrappers were not widely known. And as I read in their docs they seem also to use karakum to generate some Kotlin declarations directly from TypeScript, which saves some manual effort. So I have a maybe immature suggestion to leverage the APIs available in kotlin-wrappers and port the APIs available here but missing there if there are any. In this way, code duplication can be reduced, there is a single source of truth for the APIs, and the APIs become easily maintainable and more widely usable.