-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
25 lines (23 loc) · 996 Bytes
/
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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title>Example iFrame embed</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
// Dynamically updates height of iframe to match content
window.addEventListener("message", (event) => {
document.querySelector('iframe#trainsplit').style.height = `${Math.ceil(event.data.height) + 5}px`;
// Just used for the demo, you can remove this line:
document.querySelector('span').innerHTML = document.querySelector('iframe').style.height;
}, false);
</script>
</head>
<body>
<p>This is an embeddable widget. iFrame height is <span id="height"></span></p>
<!-- Use fully qualified domain name here -->
<!-- Feel free to tweak width -->
<iframe src="https://v3.trainsplit.com/embeddable" id="trainsplit" style="border:0; width: 600px; height: 600px;"></iframe>
</body>
</html>