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:
parent
c103c7fd7a
commit
b5d7e99ba5
5 changed files with 250 additions and 32 deletions
20
android/app/src/main/assets/intent-target.html
Normal file
20
android/app/src/main/assets/intent-target.html
Normal 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>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue