controljs icon indicating copy to clipboard operation
controljs copied to clipboard

script is not executed if there is eval inside it used. No errors shown in FireBug console

Open GoogleCodeExporter opened this issue 9 years ago • 3 comments

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

GoogleCodeExporter avatar Mar 16 '15 22:03 GoogleCodeExporter

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

GoogleCodeExporter avatar Mar 16 '15 22:03 GoogleCodeExporter

May be it makes difference to load it as an external script?

Original comment by michael.bevz on 16 Dec 2010 at 8:14

GoogleCodeExporter avatar Mar 16 '15 22:03 GoogleCodeExporter

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

GoogleCodeExporter avatar Mar 16 '15 22:03 GoogleCodeExporter