I have a Swift object that I'm exposing to JavaScriptCore like this:
@objc(MyObjectExport) protocol MyObjectExport:JSExport {
var name:String {get set}
var dict:[String:String] {get set} }
class MyObject:NSObject,MyObjectExport {
var name:String="Name"
var dict:[String:String]=["test":"TEST"] }
In the Javascript context I can happily get and set the 'name' property of a MyObject instance, but can only get, not set, the 'dict' dictionary items.
What am I missing, or is this a bug?
ECMAScript 5 doesn't support custom scripting. By exposing Dictionary to JavaScriptCore, you will be able to do something in JavaScriptCore like
But it won't work in JavaScriptCore at this stage.