ios - Why can't I set a Swift dictionary item exposed to JavaScriptCore? -
i have swift object i'm exposing javascriptcore 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 javascript context can happily , set 'name' property of myobject instance, can get, not set, 'dict' dictionary items.
what missing, or bug?
ecmascript 5 doesn't support custom scripting. exposing dictionary javascriptcore, able in javascriptcore
myobjectexport['key'] = value; but won't work in javascriptcore @ stage.
Comments
Post a Comment