Skip to content

Repository files navigation

JavascriptEngine

A Swift interface for bridging to WebKit Javascript, without wanting to kill yourself or others.

To use...

let engine = JSEngine(sourceString: "function foo(bar) {" +
    "engine.fooHandler.postMessage([bar, bar]);" +
"}")

engine.setHandlerForKey("fooHandler") { (bars: [String]) in
    println(bars.map { "why would want to do this?" })
}

engine.load {
    engine.callFunction("foo", args: ["i don't know"])
}

About

A Swift interface for bridging to WebKit Javascript, without wanting to kill yourself or others.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages