Open jakemac53 opened 8 years ago
This would need to happen during a release candidate release, before official 1.0 as it would be a breaking change.
fyi @sigmundch
We could potentially implement the full Map
class as well, but its not clear how the keys of the object should be iterated in order to do that (there are a few different ways of iterating keys of JS objects, none of which are guaranteed to do the "right" thing in all situations).
Today given a plain JsObject whose constructor is context['Object'], we convert it to a map and recursively call
convertToDart
. This could potentially be pretty expensive, and also it loses track of the original JsObject, so you can't modify it. Instead we could create a JsObjectProxy, which is basically this:This would make it lazy, which is good, but repeated access of the same keys would come at a higher cost.
We could do the same for JsArray as well.