1. WebUI Wrapper

Hi all,

I have made a wrapper for WebUI! WebUI let's you use webview or a web browser as GUI!

[https://github.com/webui-dev/webui/tree/main]

Wrapper [https://github.com/gAndy50/EuWebUI]

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="UTF-8"> 
    <title>Simple Test</title> 
    <b> Hello World! </b> 
    <br> 
    <script src="webui.js"></script> <!-- Required --> 
</head> 
<body> 
    <button id="exitBtn">Exit</button> 
 
    <script> 
        // Use WebUI's built-in JS bridge 
        document.getElementById("exitBtn").addEventListener("click", function() { 
            webui.call("close_app");  // This triggers the Euphoria callback 
        }); 
    </script> 
</body> 
</html> 

include std/ffi.e 
include std/machine.e 
 
include webui.e 
 
public function close_app() 
	webui_exit() 
	puts(1,"Closing...\n") 
	return 0 
end function 
 
atom close_id = routine_id("close_app") 
object close_cb = call_back(close_id) 
 
public procedure main() 
	atom win = webui_new_window() 
	 
	webui_bind(win,"close_app",close_cb) 
	 
	webui_set_center(win) 
	 
	webui_show(win,"index.html") 
	 
	webui_wait() 
	 
	webui_clean() 
end procedure 
 
main() 
 
new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu