[webkit-dev] RegExp on JSStaticFunction
Iker Perez de Albeniz
iker at arinos.org
Wed Apr 4 07:36:15 PDT 2012
I will try it.
Thanks.
El 3 de abril de 2012 18:46, Geoffrey Garen <ggaren at apple.com> escribió:
> JavaScript doesn't have a concept of "intercept any method invocation".
> However, it does have a concept of "intercept any property access". I
> believe you could accomplish what you want by implementing a catch-all
> JSObjectGetPropertyCallback that created the necessary function objects on
> the fly, and cached them.
>
> Geoff
>
> On Apr 3, 2012, at 1:02 AM, Iker Perez de Albeniz wrote:
>
> > Hi,
> >
> > I have estarted a personal project and i am new on wbkit development. I
> have a question about the posibility of using regular expression on
> JSStaticFunction struct name.. so i can resolve every methos of a class
> with an unique funcrtion..
> >
> > My idea is to hace a fucntion that conects to a socket where the "core"
> of the class is available.. so i can do something like..
> >
> >
> > static JSValueRef myclass_mymethod(JSContextRef context,
> > JSObjectRef function,
> > JSObjectRef thisObject,
> > size_t argumentCount,
> > const JSValueRef arguments[],
> > JSValueRef *exception)
> > {
> > // get the name of the funcion called
> > //open a socket and call to a REST service
> > }
> >
> >
> > static const JSStaticFunction class_staticfuncs[] ={
> > { ".*", myclass_mymethod, kJSPropertyAttributeReadOnly },
> > { NULL, NULL, 0 }
> > };
> >
> > The idea is to create a bridge betwing JS and a core accesible via
> sockets/Json..
> >
> >
> > Regards.
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120404/0838cafc/attachment.html>
More information about the webkit-dev
mailing list