<!doctype html>
|
<html lang="en">
|
<head>
|
<meta charset="utf-8">
|
<title>WebView Bridge Test</title>
|
<style>
|
html, body {
|
margin: 0;
|
width: 100%;
|
height: 100%;
|
background: transparent;
|
color: #f4f7fb;
|
font: 14px/1.4 "Segoe UI", sans-serif;
|
}
|
|
body {
|
display: grid;
|
place-items: center;
|
background: rgba(24, 31, 42, 0.78);
|
}
|
|
main {
|
padding: 16px;
|
}
|
</style>
|
</head>
|
<body>
|
<main>
|
<strong id="status">Initializing bridge...</strong>
|
<div id="details"></div>
|
</main>
|
<script>
|
(async () => {
|
const status = document.getElementById("status");
|
const details = document.getElementById("details");
|
try {
|
const runtime = await window.moliDesktop.getRuntimeInfo();
|
status.textContent = "Bridge ready";
|
details.textContent = `${runtime.pluginId} / ${runtime.hostId}`;
|
} catch (error) {
|
status.textContent = "Bridge failed";
|
details.textContent = error && error.message ? error.message : String(error);
|
}
|
})();
|
</script>
|
</body>
|
</html>
|