2024-08-17 05:04:08 +03:00
|
|
|
<!doctype html>
|
2021-06-17 14:59:27 +03:00
|
|
|
<html lang="en">
|
2021-07-04 01:48:04 +03:00
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
</head>
|
2021-06-17 14:59:27 +03:00
|
|
|
|
2021-07-04 01:48:04 +03:00
|
|
|
<body>
|
2024-08-27 01:25:36 +03:00
|
|
|
<div>
|
|
|
|
<strong>Resource `assets/index.js` path:</strong>
|
|
|
|
<span id="path"></span>
|
|
|
|
</div>
|
|
|
|
<strong>Resource `assets/index.js` content:</strong>
|
|
|
|
<pre id="content"></pre>
|
|
|
|
|
2021-07-04 01:48:04 +03:00
|
|
|
<script>
|
2024-08-27 01:25:36 +03:00
|
|
|
const { invoke } = window.__TAURI__.core
|
|
|
|
const { resolveResource } = window.__TAURI__.path
|
|
|
|
|
|
|
|
const pathEl = document.querySelector('#path')
|
|
|
|
const contentEl = document.querySelector('#content')
|
|
|
|
|
|
|
|
window.addEventListener('DOMContentLoaded', async () => {
|
|
|
|
const path = await resolveResource('assets/index.js')
|
|
|
|
pathEl.textContent = path
|
|
|
|
|
|
|
|
const content = await invoke('read_to_string', { path })
|
|
|
|
contentEl.textContent = content
|
2021-07-04 01:48:04 +03:00
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</body>
|
2021-06-17 14:59:27 +03:00
|
|
|
</html>
|