Serve ui out of local html files; pass text/plain and image/* data to the webview using a data url

This commit is contained in:
Donovan Preston 2018-06-22 16:48:21 -04:00
parent c103c7fd7a
commit b5d7e99ba5
5 changed files with 250 additions and 32 deletions

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Firefox Send</title>
</head>
<body>
<div id="output">output</div>
<script>
window.addEventListener("message", (event) => {
fetch(event.data).then(res => res.text()).then(txt => {
document.getElementById('output').textContent = "GOT MESSAGE" + txt;
});
}, false);
</script>
</body>
</html>