generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
40 lines (38 loc) · 1.04 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
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Minimal Outside</title>
<style>
iframe#amos {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100vw;
height: 100vh;
margin: 0;
border: 0;
padding: 0;
overflow: hidden;
}
</style>
</head>
<body>
<iframe id="amos"></iframe>
<script>
// Callback function to start viewer via viewerAsync
window.parent = {
callback: function(viewerWindow, viewerAsync) {
console.info("initial callback called:", viewerWindow, viewerAsync);
viewerAsync("../assets/", (api) => {
console.info("loaded callback called with API:", api);
});
}
};
// start src/index.html
document.getElementById('amos').setAttribute('src', "./src/index.html?onload=window.parent.callback");
</script>
</body>
</html>