<div dir="ltr"><div>Hello, everyone.</div><div><br></div><div>Some background first: my name is Estêvão and every now and the I try to contribute to Gnome Web, AKA Epiphany. First time was back in 2010. After the migration of Epiphany to WebKit, it stopped identifying feed links on pages. I had to dig into JavaScriptCore to call JavaScript functions to check for feed links on pages. DOM bindings were only in TODO by then. Now what I need to do is a little bit different, but also involves JavaScriptCore. We need to bridge between JavaScript and C code so that an about page can be able to list URLs to display. I was chocked that up to now JavaScriptCore is untouched. So I started thinking about how could a GObject binding to JSC be implemented.</div><div><br></div><div>The proposal:</div><div><br></div><div>I&#39;m thinking about creating GObjects to warap JSC objects. For instance: GJSCContext wrapping JSContextRef, GJSCObject wrapping JSObjectRef and so on. I implemented a POC of the API and a simple client to make my intentions clearer. It&#39;s available on <a href="https://github.com/tevaum/jsc-bindings">https://github.com/tevaum/jsc-bindings</a>.</div><div><br></div><div>With that *not-so-gobject* partial API the client is able to bridge javascript functions to native C callbacks and to execute javascript code from C. Also the C function returns an array to the javascript code. An example of error handling is also shown.</div><div><br></div><div>I think that we have to start simple and add stuff incrementally, based on what&#39;s already being used/requested by people. Please take your time to dig into the example code provided, ask questions and poit directions, so that we can buld a better WebKitGTK+.</div><div><br></div><div>Thanks!</div><div><br></div><div>Estêvão Samuel Procópio Amaral</div><div><br></div></div>