@seanox/aspect-js
Version:
full stack JavaScript framework for SPAs incl. reactivity rendering, mvc / mvvm, models, expression language, datasource, routing, paths, unit test and some more
46 lines (43 loc) • 1.51 kB
HTML
<html>
<head>
<meta charset="ISO-8859-1">
<title>Seanox aspect-js test environment</title>
<style>
body {
font-family: monospace;
white-space: pre;
}
iframe {
height: 2em;
}
</style>
<script src="aspect-js.js"></script>
<script type="text/javascript">
Test.activate();
Test.create({test() {
for (let loop = 1; loop <= 3; loop++) {
let frame = document.querySelector("iframe:nth-child(" + loop + ")");
frame = frame.contentDocument || frame.contentWindow.document;
const text = frame.body.textContent;
Assert.assertTrue(!!text.match(/TypeError|ReferenceError|not defined|undefined or null reference/));
}
}});
// must be var because it is used in a frame via parent
// must be used as global, because the expression language uses its own scope,
// alternatively var can be used.
var count = 0;
let interval = window.setInterval(() => {
if (count < 3)
return;
window.clearInterval(interval);
Test.start();
}, 250);
</script>
</head>
<body>
<iframe src="composite_events_error_1.html"></iframe>
<iframe src="composite_events_error_2.html"></iframe>
<iframe src="composite_events_error_3.html"></iframe>
</body>
</html>