If f() is not defined within the content script, then it cannot be accessed (due to the isolated worlds thing).
☆PhistucK On Mon, Dec 7, 2009 at 09:30, disya2 <[email protected]> wrote: > Hi, > > In the extension I'm working on I need to simulate mouse clicks. > Currently I use initMouseEvent/createEvent/dispatchEvent and the event > sequence is mousedown/mouseup/click. The code runs in content script. > This works pretty well for > <a href="javascript:f()"></a> > but fails for > <div onclick="f()"/> > with error message "f" is not defined. Function f() is defined on a > web page. > So I'm a bit confused why href="javascript:f()" works and onclick="f > ()" doesn't. > > Thanks, > Denis > > -- > > You received this message because you are subscribed to the Google Groups > "Chromium-extensions" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<chromium-extensions%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/chromium-extensions?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.
