sciter-sdk / rust-sciter

Rust bindings for Sciter

Home Page:https://sciter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extension example doesn't work with Sciter.JS

GirkovArpa opened this issue · comments

The example works as intended. But porting it to Sciter.JS does not:

<html>
<head>
  <title>extension test</title>
  <style type="text/css">
  </style>
  <script type="text/javascript" type="module">
    // copy "extension.dll" next to the "sciter.dll"
    import { loadLibrary } from "@sciter";
    const ext = loadLibrary("extension");
    console.log(ext); // Object
    console.log(JSON.stringify(ext)); // "{"add":"","sub":""}"
    console.log(typeof ext.add); // string
    console.log(ext.add(1,2)); // TypeError: not a function
    console.log(ext.sub(1,2));
  </script>
</head>
<body>
  <h4>see logs in Inspector</h4>
</body>
</html>

Thanks for reporting this, nice to know. But there's nothing we can do in Rust, as I see.

I see.

For the record, I was hoping I could try my hand at the "sciter-ffmpeg.dll" referenced here. If Sciter.JS removed this API I suppose the only other is SOM, which is quite complicated for me.