Hi ,all:
 I'm using QtWebkit on Windows,i wan to make sure the console object and
it's attributes are  readonly in javascript,

first of all,I change JSDomWindow.cpp ,
change the attribute console of window  to readOnly( it seems useless).
    { "console", DontDelete|ReadOnly, (intptr_t)jsDOMWindowConsole,
(intptr_t)setJSDOMWindowConsole },

then I edit JSConsole.cpp,
change the attribute  log of console to readOnly.
   { "log", DontDelete|Function|ReadOnly,
(intptr_t)jsConsolePrototypeFunctionLog, (intptr_t)setJSDOMWindowConsoleAttr
},

but with the following javascript statements:
console.log("test");
try{
console.log=function(){}
}
catch(ex) {
alert("exception");
}
console.log("test2");

the output is :
test

there is no test2 at all;

thanks



-- 
bai
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

Reply via email to