Yes we have something like this on the list for the new API. Haven't
gotten around to implementing it yet though.
-Pelle
Christopher Blizzard wrote:
> poopdawg wrote:
>> hi
>>
>> ive embedded gecko in my c++ app. in the app window, ive loaded an
>> html page that also defines a JS method. i would like to invoke this
>> method and get the return value.
>>
>> ive seen a lot of blog/group posts related to XPCOM/JS and read about
>> spidermonkey(JS_CallFunctionName?). can someone point me in the right
>> direction as to how to actually go about doing this? i am unable to
>> find sample code on this :(
>>
>> cheers
>> amitabh
>>
>>
>> --------- test.html ---------
>> <html>
>> <script language="JavaScript" type="text/JavaScript">
>> function fn_test()
>> {
>> return "teststring" ;
>> }
>> </script>
>> <body>hello!</body>
>> </html>
>>
>> --------- c++ -------------
>> //i would like to call something like this
>> mybrowser.loadURI("test.html")
>> mybrowser.calljavascript("fn_test", &rv); //rv shd have "teststring"
>>
>>
>
> I know that this is one of the cases that we want to handle in our new
> embedding API and that people have done it in the past. Mark? Pelle?
> Thoughts?
>
> --Chris
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding