i am sure it is not possible to execute it as
webview.
addJavascriptInterface(new Def(), "Abc.Def");

did u find any solutions?

i made a framework to achieve this,
and i am stuck at v8 level
not able to attach a child object to parent object

i have tried out the following way

i have two np objects parent and child which naturally got it from java
classes
and i am creating v8 objects out of them as below

v8::Handle<v8::Object> parentObject = createV8ObjectForNPObject(
parent, 0);
v8::Handle<v8::Object> childObject = createV8ObjectForNPObject(child,
parent);

now when i am setting the childObject to the parent object lik

parentObject->Set(v8String(key), childObject);

and then when i execute my javascript as

parent.child.func();
it does not get executed

but if i do
v8::Handle<v8::Object> global = v8Context->Global();
 global->Set(v8String(key), childObject);

i am able to execute
child.func();

the code for createV8ObjectForNPObject basically creates a wrapper JSObject
and calls wrapNPObject(value, object);

and it calls  _NPN_RegisterObject(object, root);
so for my parent object root is 0
and for my childObject root is parent npobject


Can you please tell me where i am going wrong.




LG


2010/2/22 always19 <[email protected]>

> I'm wondering
>  > webview.addJavascriptInterface(new Def(), "Abc.Def");
>  does work or not.
> Actually, I need it too.
> like,
> {{
> window.Abc.Def.method();
> }} on script.
>
> How can I add javascriptinterface on deeper inner object? not as a
> directly child of window object.
>
> Sorry that it's not an answer of yours.
> -19
>
> On 1월11일, 오후7시51분, androlance <[email protected]> wrote:
> > Actually, I made some changes insideaddJavascriptInterface() method
> > of webview class of webkit.
> > Then  in our android project
> >
> > webview.addJavascriptInterface(new Abc(), "Abc");
> >
> > webview.addJavascriptInterface(new Def(), "Abc.Def");
> >
> > then it is executing in reverse order
> > Abc.Def
> >
> > Abc
> >
> > Can any body tell me why and how to over come from this problem...
> >
> > Thanks & Regards
> > androlance
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en

Reply via email to