Skip to content

Dioxus native target doesn't compile #11

@ronnybremer

Description

@ronnybremer

Thank you for providing this crate. It looks very promising.

I tried to use it in a Dioxus desktop app, but unfortunately, I can't compile it:

12:07:22 [cargo] error[E0599]: no method named `location` found for struct `web_sys::Window` in the current scope
  --> /home/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/table-rs-0.0.4/src/dioxus/table.rs:90:31
   |
90 |         let location = window.location();
   |                               ^^^^^^^^ method not found in `web_sys::Window`

12:07:22 [cargo] error[E0599]: no method named `location` found for struct `web_sys::Window` in the current scope
   --> /home/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/table-rs-0.0.4/src/dioxus/table.rs:100:27
    |
100 |         let href = window.location().href().unwrap();
    |                           ^^^^^^^^ method not found in `web_sys::Window`

12:07:22 [cargo] error[E0599]: no method named `history` found for struct `web_sys::Window` in the current scope
   --> /home/me/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/table-rs-0.0.4/src/dioxus/table.rs:107:14
    |
106 | /         window
107 | |             .history()
    | |_____________-^^^^^^^
    |

From the error message I assume, that certain functionality of web_sys::Window is not exposed for desktop targets, even though they run in a webview. Would there be any workaround or is this crate targeting wasm only?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions