tauri/tooling/bench/tests/files_transfer/public/index.html

46 lines
1.1 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to Tauri!</title>
</head>
<body>
<h1>Welcome to Tauri!</h1>
<script>
window.addEventListener("DOMContentLoaded", (event) => {
window.__TAURI__.invoke("tauri", {
__tauriModule: "Fs",
message: {
cmd: "readBinaryFile",
path: ".tauri_3mb.json",
options: {
// home folder
dir: 11
}
},
}).then((_data) => {
window.__TAURI__.invoke("tauri", {
__tauriModule: "Process",
message: {
cmd: "exit",
exitCode: 0,
},
});
}).catch((_error) => {
// error
window.__TAURI__.invoke("tauri", {
__tauriModule: "Process",
message: {
cmd: "exit",
exitCode: 1,
},
});
});
});
</script>
</body>
</html>