Thanks for your reply. It looks good but it cannot continue original parseInt() so the Javascript code might be stopped in middle of the code. So I think I should backup the original built-in function and then over-write the function with my function that checks the arguments and calls original one.
How do I get the original built-in function reference from C++ code? On 1月5日, 午前7:56, Dean McNamee <[email protected]> wrote: > These methods should just be properties on the global object, and you > should be able to replace them with whatever you want. > > $ ./shell_g > V8 version 0.4.6> parseInt('123') > 123 > > parseInt = function() { return 10; } > > function () { return 10; }> parseInt('123') > > 10 > > -- dean > > On Sun, Jan 4, 2009 at 2:56 PM, Metaphor <[email protected]> wrote: > > > I want to know what value is used in JavaScript built-in function > > argument like parseInt(), unescape() and isNaN(). > > Is it possible to set callback function from my code using V8? > > > Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
