In deno, window is defined and represents the usual globalThis (but document isn't for example), so this "browser check" doesn't work here. Fortunately in this case, the thing this check really should do is to check for window.Element and not just window.
When using this library within deno inside a React SSR environment, the check introduced in https://github.com/WICG/inert/pull/152 is not enough.
In deno,
window
is defined and represents the usualglobalThis
(butdocument
isn't for example), so this "browser check" doesn't work here. Fortunately in this case, the thing this check really should do is to check forwindow.Element
and not justwindow
.My suggestion would be to replace this:
with this:
and I will add a PR for that.