[webkit-dev] RegExp on JSStaticFunction

Iker Perez de Albeniz iker at arinos.org
Tue Apr 3 01:02:10 PDT 2012


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120403/5e5fa67a/attachment.html>


More information about the webkit-dev mailing list