-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
35 lines (28 loc) · 1.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://unpkg.com/starboard-notebook"> -->
<!-- <meta http-equiv="X-Content-Security-Policy" content="default-src 'self'; script-src 'self' https://unpkg.com/starboard-notebook"> -->
<title>~</title>
</head>
<body>
<h1>starboard-electron</h1>
*Please note that this is very simple example and caution must be taken when running scripts within this application!*
<!-- May require other files to run in this process in the future... -->
<div id="mount-point"></div>
<script type="module">
import {StarboardEmbed} from "./node_modules/starboard-wrap/dist/index.js"
window.StarboardEmbed = StarboardEmbed;
const mount = document.querySelector("#mount-point");
const el = new StarboardEmbed({
notebookContent: "# %% [javascript]\n3+5\n",
src: "https://unpkg.com/[email protected]/dist/index.html"
});
el.style.width = "100%";
mount.appendChild(el);
</script>
<script src="./renderer.js"></script>
</body>
</html>