-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathMultiBindingTest.html
More file actions
57 lines (56 loc) · 2.54 KB
/
MultiBindingTest.html
File metadata and controls
57 lines (56 loc) · 2.54 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Multi Binding Test</title>
<script type="text/javascript">
var DYNAMIC_CONTAINER_COUNT = 6;
var PRIMES = [1453, 4273, 6277, 9923, 26099, 41231];
function replaceContainer(id, src)
{
console.log("Replacing Container " + id);
var container = document.getElementById("dynamicContainer" + id);
var newFrame = document.createElement("iframe");
newFrame.style.width = newFrame.style.height = "100%";
newFrame.src = src || "custom://cefsharp/BindingTest.html";
Array.prototype.forEach.call(container.children, c => container.removeChild(c));
container.appendChild(newFrame);
}
window.addEventListener("load", function()
{
for (var i = 0; i < DYNAMIC_CONTAINER_COUNT; i++)
{
var interval = PRIMES[i%PRIMES.length];
window.setInterval(replaceContainer.bind(undefined, i + 1), interval);
}
});
</script>
</head>
<body>
<table style="width:100%; height:100%">
<tr height="34%">
<td width="50%" id="dynamicContainer1">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
<td width="50%" id="dynamicContainer2">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
</tr>
<tr height="33%">
<td width="50%" id="dynamicContainer3">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
<td width="50%" id="dynamicContainer4">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
</tr>
<tr height="33%">
<td width="50%" id="dynamicContainer5">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
<td width="50%" id="dynamicContainer6">
<iframe src="custom://cefsharp/BindingTest.html" style="width:100%; height:100%"></iframe>
</td>
</tr>
</table>
</body>
</html>