sciter-sdk/rust-sciter

WebView does not work

SULAPIS opened this issue · 6 comments

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

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

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

yes,they are in same folder

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

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.

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

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.