script_bridge.rs, index.js

This commit is contained in:
Martin Kavík 2024-06-15 23:15:28 +02:00
parent a58ea4fba5
commit a299ae1082
5 changed files with 33 additions and 1 deletions

2
backend/index.js Normal file
View file

@ -0,0 +1,2 @@
import { FW } from '/_api/pkg/frontend.js';
window.FW = FW;

View file

@ -5,6 +5,10 @@ async fn frontend() -> Frontend {
"<style>",
include_str!("../style.css"),
"</style>"
)).append_to_head(concat!(
"<script type=\"module\">",
include_str!("../index.js"),
"</script>"
))
}