controljs
controljs copied to clipboard
script is not executed if there is eval inside it used. No errors shown in FireBug console
What steps will reproduce the problem?
1. Make a script with eval
var Foo = {
init: function() {
eval("alert('test')");
}
};
2. Try to load it with control.js
What is the expected output? What do you see instead?
Expected to see Foo in DOM tree. When you try to call Foo.init(), it appears
undefined.
What version of the product are you using? On what operating system?
MacOS, FireFox 3.6
Original issue reported on code.google.com by michael.bevz
on 16 Dec 2010 at 2:48
I am unable to reproduce this issue. The Foo.init() function can be called
when the code is added inline via this script tag:
<script type=text/cjs>
var Foo = {
init: function() {
eval("alert('test')");
}
};
</script>
Original comment by [email protected]
on 16 Dec 2010 at 8:02
May be it makes difference to load it as an external script?
Original comment by michael.bevz
on 16 Dec 2010 at 8:14
Can you paste your HTML and JavaScript? I cannot see why, if it's an external
file, this would be a problem.
Original comment by [email protected]
on 16 Dec 2010 at 9:15