Failed first time, re-try, sorry for spamming if you received it twice.

I don't fully understand what exactly you need. If you want to expose a JAVA
object to JavaScript in Android browser,
you can call WebView.addJavaScriptInterface(<java object>, "myObj"), then JS
code can access it by 'window.myObj'.
You cannot set properties on myObj, but you can work around it by having
'setX(int v)' method.

On Wed, Dec 8, 2010 at 6:04 AM, Volter Yen <[email protected]> wrote:

> Hi all,
>     I want to extend my javascript in webpage  on android, eg. "var myObj =
> new MYOBJ(); myObj.x =3",
> according to v8 guide and webkit sourcecode. the former guide us to write
> standalone v8-based application,
> and the later the target to extend. I found that the binding from domwindow
> object to v8domwindow is auto generated by scripts,
>   then I met problem when I try to add customized javascript to the
> webcore, for example , In the webcore, DOM binding  will create a context ,
> where specified Frame related extensions and objecttemplate , it seems that
> I could v8::RegisterExtension and add objecttemplate to the exisited
> context enviroment in order binding my customzied MYOBJ to v8,   is it the
> correct idea?and how can I add my objecttemplate for  MYOBJ to the exisit on
> for webcore's DOM,  please give me some hint  or example on this ,thank you!
> Volter
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to