Hi, friends,
I got an interesting question here
Script like this can't be executed, it will throw a exception invocation
error.
<script>
var alias = document.write;
alias("something");
</script>
But if we define the script like the following, then it is OK for excution.
<script>
function constructor(){};
var object = new constructor();
object.fun = function (str){document.write(str);}
var alias = object.fun;
alias("something");
</script>
Why these two behavior differently?
What is the reason?
Cheers~
Xiang
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users