Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : URGET : can.Component 2.0.4 broken in IE8

$
0
0
Justin

The following EXTREMELY basic test will not run in my IE8 on either XP or Win7. Native IE8, not emulation !

It fails silently and does not run to completion, the final consoel.log('finished') is never executed.

If IE Dev Tools are open then there is a JS error :

      Unexpected call to method or property access, can.custom.2.0.4.min.js line 10 character 1204

<!DOCTYPE html>
<html lang="en">
<head>
<title>IE8 failure demo</title>
<script src="html5shiv.js"></script>
<script src="jquery.1.8.3.min.js"></script>
<script src="can.custom.2.0.4.min.js"></script>
<script id="test-template" type="text/x-handlebars-template">
<test-tag/>
</script>
<script>
$(document).ready(function() {
console.log('loaded');
testComponent();
$('body').append(can.view('test-template', {}));
console.log('finished');
});
// component function
function testComponent() {
console.log('testComponent start');
can.Component.extend({
tag: 'test-tag',
template: '<div>this is the component</div>',
scope: {
// no scope
},
events: {
// no events
}
});
console.log('testComponent end');
}
</script>
</head>
<body>
<h3>can.Component IE8 failure test</h3>
</body>
</html>


Viewing all articles
Browse latest Browse all 3491

Trending Articles