webview / webview_deno

🌐 Deno bindings for webview, a tiny library for creating web-based desktop GUIs
https://deno.land/x/webview
MIT License
1.44k stars 75 forks source link

Errors when running on Windows #179

Closed nhrones closed 3 weeks ago

nhrones commented 3 weeks ago

I get errors when running on Windows. Seems the problem is incorrect code on @jsr. The ffi code on jsr tests for 'window' rather than 'globalThis'.

The GitHub version of /src/ffi.ts uses globalThis and works correctly.

if (Deno.build.os === "windows") {
  if ((self as never)["globalThis"]) {

The version of /src/ffi.ts on @jsr is still testing for 'window'

if (Deno.build.os === "windows") {
  if ((self as never)["window"]) {

The 'globalThis' version runs without errors.

Does the @jsr need to be updated?

Should I use a GitHub or Deno/x link for 0.8.0 ?

eliassjogreen commented 3 weeks ago

Hey! Just released a new x version 0.8.1 which should fix it. The JSR version does indeed need to be updated, doing that now.

nhrones commented 3 weeks ago

Thanks! Very fast response!