sciter-sdk / rust-sciter

Rust bindings for Sciter
https://sciter.com
MIT License
811 stars 75 forks source link

WebView does not work #139

Open SULAPIS opened 2 years ago

SULAPIS commented 2 years ago

When I run the program, WebView does not display the web page. The examples of this repositories can run successfully in my computer and I also use the sciter-webview.dll file. Did I do anything wrong?These are my codes.

webview.html

<html>

<head>
    <title></title>
    <style>
        html,
        body {
            padding: 0;
            margin: 0;
        }

        webview {
            display: block;
            size: 1000;
            background: red;
            behavior: webview library(sciter-webview);
        }
    </style>

</head>

<body>

    <webview src="https://www.sciter.com"></webview>
</body>

</html>

main.rs

use sciter;

fn main() {
    let mut frame = sciter::Window::new();
    frame.load_file("webview.html");
    frame.run_app();
}
<- rust                                                             scapp.exe->

image

c-smile commented 2 years ago

Do you have sciter-webview.dll in the same folder as sciter.dll ?

SULAPIS commented 2 years ago

Do you have sciter-webview.dll in the same folder as sciter.dll ?

yes,they are in same folder

AnassKartit commented 2 years ago

it is not working with tiscript and version 4.4.9, is it supported only with js sdk and version 5.0? @c-smile

c-smile commented 2 years ago

library part here:

behavior: webview library(sciter-webview);

is supported by Sciter.JS only.

In principle you can use webview with Sciter.TIS but you will need to either compile that plugin statically with your app or create a local proxy behavior for that DLL.

AnassKartit commented 2 years ago

is it possible to use sciter js and tiscript at the same time, i am trying to add oauth to tiscript with a webview for authentication, in electron this is working with no issue https://learn.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-nodejs-desktop

c-smile commented 2 years ago

is it possible to use sciter js and tiscript at the same time,

No. I'd suggest to port your TIS code to JS. Normally that's line-to-line porting.