You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use any web browser or WebView as GUI, with your preferred language in the backend and modern web technologies in the frontend, all in a lightweight portable library.
<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><!-- You must add webu.js; otherwise, the interaction cannot be performed --><scriptsrc="webui.js"></script></head><body><buttononclick="btn()">asd</button><script>functionbtn(){hello('hello').then(function(res){console.log(res)})}</script></body></html>
index.php
require"./vendor/autoload.php";
useKingbes\Webui;
useKingbes\JavaScript;
$Webui = newWebui;
$html = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . "index.html");
$window = $Webui->newWindow();
$bind = $Webui->bind($window, "hello", function ($event, JavaScript$js) {
// Gets the first argument as a string$arg_one = $js->getString($event);
var_dump($arg_one);
// return string$js->returnString($event, "nihao");
});
$Webui->show($window, $html);
$Webui->wait();
$Webui->clean();
Various usage instructions
Webui Webui class
JavaScript Used to interact with js bindings
Wrapper Wrappers that wrap the entire interaction, etc
Cobj Wrappers, which wrap the entire interaction with other C object classes, some functions may be required