[webkit-help] Decoupling JavaScript from WebCore (ScriptState, etc.)

Tim Mahoney tim.mahoney at me.com
Fri Dec 21 12:13:34 PST 2012


I'm generating bindings between Ruby and WebCore. The goal is to allow Ruby to be used instead of JavaScript. This means I'll need to create generic versions of the the JavaScript-specific classes like ScriptState and ScriptController.

So far, I've been pleasantly surprised by the decoupled nature of JavaScript and WebCore, but it depresses me to look at the ScriptState class. I figure I'll make a generic interface for ScriptState, then I'll rename the JSC and V8 implementations to JSCScriptState and V8ScriptState. Finally, I'll create an RBScriptState class for Ruby.

The problem is that I might make a mess. Can anyone give me some advice or words of wisdom before I put on my refactoring hat and go for it?

If you're interested, you can find my progress here: http://github.com/timahoney/ruby-in-the-browser

Thanks,
Tim


More information about the webkit-help mailing list