/
basics.html
39 lines (37 loc) · 1.11 KB
/
basics.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
<!doctype html>
<html>
<head>
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
</head>
<body>
<script>
window.isReady = window.parent.isReady || function(el) {
console.log(el.length);
console.log(el.innerHTML);
};
window.hasError = window.parent.hasError || function(error) {
console.log(error.stack);
console.log("error in autoload", error)
};
window.removeMyself = window.parent.removeMyself;
</script>
<script type='text/stache' id='basics' foo='bar' can-autorender>
<can-import from="can-view-autorender/test/basics"/>
<my-component></my-component>
</script>
<script src='../node_modules/steal/steal.js' main='@empty'></script>
<script src='../../../node_modules/steal/steal-with-promises.js' main='@empty'></script>
<script>
steal.done().then(function() {
System.import('can-view-autorender').then(function(ready) {
System.import('can-view-model').then(function(viewModel) {
ready(function() {
var myComponents = document.body.querySelectorAll("my-component");
isReady(myComponents, viewModel(myComponents[0]));
}, hasError);
});
});
});
</script>
</body>
</html>