newbie.programming at yahoo.com
Fri Dec 21 06:12:33 PST 2012
newbie <newbie.programming at ...> writes:
> Brent Fulgham <bfulgham at ...> writes:
> > Hi Rippel,
> > It's really not very complicated, and is also illustrated in the Inspector
> code in the WebKit archive. E-mail if you have any problems.
> > -BrentSent from my iPad
> > On Jun 22, 2012, at 9:41 AM, rippel tippel <rippeltippel <at> gmail.com>
> application.I found plenty of documentation and examples regarding v8 and
> docs, e.g. , , and ).Can anyone point me to some documentation and/or
> examples, and/oroutline the basic steps for doing it?mKind regards,Rippel
> l_______________________________________________webkit-help mailing
> L0Ma0HqZfWbjwXJbYFA32Q <at>
> Hi Brent,
> I am really a newbie to programming. I know a bit of c++ but have no knowledge
> of JaveScriptCore.
> I am working on a webkit project where I have to call, the c++ object methods
> I looked at the CallJS code but as I said, I am a newbie, I could not
> it properly.(Sorry for being a pain.)
> I tried to build in Visual Studio 10(It converted the project before opening
> I am able to build it but not run it. I get the error "This application has
> failed to start as application configurtaion is incorrect".
> So, I am unable to run it in debugger and what is going on.
> Also, the thing that I haven't understood is that, is this for calling C++
> if this makes any sense).
> My question is suppose, I have a simple c++ class called temp and that has a
> method called doTemp(), then how do I call that method from JS Core.
> Class Temp
> int doTemp(int x, char *y, InsOfSomeClass& z);
> Here z is instance of some other class defined in some other file
> Is it like, we are registering C++ methods in callJsFunction() function and
> they can be called from JS Core when needed?
> webkit-help mailing list
> webkit-help <at> lists.webkit.org
Having dug deeper into it, I found JSBindings.cpp.
So, now I know CallJS works both ways, basically, we can call JS core code from
C++ and vice-versa.
But, still I haven't understood how it is being done.
Do, we need to make bindings for every C++ function that we call from JS core,
static JSValueRef console_setscript(JSContextRef ctx, JSObjectRef /*function*/,
JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef
/*arguments*/, JSValueRef* /*exception*/);
What will be the best place to do it?
Is it possible for soemone to explain me the flow, how we are achieving this.
I can see CallJSDlg::callJsFunction() fn. doing some kind of bindings but what
exactly is happening and what is the flow.
More information about the webkit-help