I have problem only with Mozilla browser.
PLease Help
Thanks in advance
Harry
--
View this message in context: http://www.nabble.com/Call-javascript-function-tf2349169.html#a6541588
Sent from the Mozilla - JavaScript Engine mailing list archive at Nabble.com.
On 9/28/06, Harry <haris...@greymatterindia.com> wrote:
>
> Hello friends I want to call javascript function on web page from a Mozilla
> extension. The functions are in JS files included in web page and i want to
> call those from for example my toolbar attached to the Mozilla browser.
>
You can't call the functions in content because of XPCNativeWrappers.
Read the documentation at
http://developer.mozilla.org/en/docs/XPCNativeWrapper carefully, it
answers your question.
Note that accessing anything in the web page's script may lead to
security problems, so you shouldn't do this on pages that are not
guaranteed to be non-malcious.
Nickolay
But is there any method to do it,
means can we try to break security or can we define our functions in JS file
so that we can access them from toolbar.
Harish
--
View this message in context: http://www.nabble.com/Call-javascript-function-tf2349169.html#a7073106
Yes, and it's described on the xpcnativewrapper page. You could also
search these groups for wrappedJSObject and evalInSandbox.
Nickolay
>
> means can we try to break security or can we define our functions in JS file
> so that we can access them from toolbar.
>
> Harish
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Call-javascript-function-tf2349169.html#a7073106
> Sent from the Mozilla - JavaScript Engine mailing list archive at Nabble.com.
>
> _______________________________________________
> dev-tech-js-engine mailing list
> dev-tech-...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-js-engine
>
i used sand box technique using "evalinsandbox" and it is working
fine.
But it will not work for Ajax function calls.
Is there any other solution
if yes then plz reply
Harry.....