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

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -