rust-sciter icon indicating copy to clipboard operation
rust-sciter copied to clipboard

WebView does not work

Open SULAPIS opened this issue 3 years ago • 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();
}

image

SULAPIS avatar Aug 20 '22 20:08 SULAPIS

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

c-smile avatar Aug 21 '22 14:08 c-smile

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

yes,they are in same folder

SULAPIS avatar Aug 21 '22 15:08 SULAPIS

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

AnassKartit avatar Oct 28 '22 10:10 AnassKartit

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.

c-smile avatar Oct 28 '22 20:10 c-smile

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

AnassKartit avatar Oct 28 '22 21:10 AnassKartit

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.

c-smile avatar Oct 30 '22 04:10 c-smile