b_lib <-> good/bad popup ipc now solved

this was the big problem that was a huge hiccup.

it is now solved.

The next thing is just getting the buttons to work the way they're expected to

other than that it's all fine.
This commit is contained in:
2023-10-18 22:26:22 -06:00
parent e677822f43
commit 76092fc43d
4 changed files with 137 additions and 56 deletions
+2
View File
@@ -15,5 +15,7 @@
<br>
<button id="bad">No</button>
<script type="module" src="./gb.js"></script>
<body>
</html>
+17
View File
@@ -0,0 +1,17 @@
// see b_lib.ts, function gb for the thing that talks to this
main();
async function main() {
// connect to the runtime
let port = browser.runtime.connect();
// wait for a message
port.onMessage.addListener(
function({title, miscinfo, timeout_ms}) {
console.log('title', title);
console.log('miscinfo', miscinfo);
console.log('timeout_ms', timeout_ms);
document.getElementById('title-h1').innerHTML = title;
document.getElementById('miscinfo').innerHTML = miscinfo;
}
);
}