Hi,<div><br></div><div>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..</div>
<div><br></div><div>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..</div><div><br></div><div><br></div><div><div>static JSValueRef myclass_mymethod(JSContextRef context,</div>
<div> JSObjectRef function,</div><div> JSObjectRef thisObject,</div><div> size_t argumentCount,</div><div> const JSValueRef arguments[],</div>
<div> JSValueRef *exception)</div><div>{</div><div> // get the name of the funcion called</div><div> //open a socket and call to a REST service</div><div>}</div></div><div><br></div><div><br></div>
<div><div>static const JSStaticFunction class_staticfuncs[] ={</div><div> { ".*", myclass_mymethod, kJSPropertyAttributeReadOnly },</div><div> { NULL, NULL, 0 }</div><div>};</div></div><div><br></div><div>The idea is to create a bridge betwing JS and a core accesible via sockets/Json..</div>
<div><br></div><div><br></div><div>Regards. </div>