polymer-dart icon indicating copy to clipboard operation
polymer-dart copied to clipboard

JsProxy fields should be enumerable?

Open jakemac53 opened this issue 9 years ago • 1 comments

Today they are not, but they probably should be (or at least I don't see a reason why not).

One potential issue, on the JS side they may try to JSON encode these objects, and then JSON decode them back. The object they get back won't be tied to a dart object or type any more, so its going to act just like a normal js object and get converted to a dart map. Today they will just get an empty object since the fields aren't enumerable, so at least it kind of throws up a red flag that something is not working as expected.

jakemac53 avatar Oct 07 '15 21:10 jakemac53

patches welcome!

sethladd avatar Oct 27 '14 16:10 sethladd

@seaneagan do you think pub-dartlang should have a discovery endpoint api? For this particular use case, we could call pub.packages.list providing the q parameter and limit the response to names only. den could then employ discovery_api_dart_client_generator.

I was thinking to attempt this starting with the following apis:

pub.packages.get pub.packages.list pub.authors.get pub.authors.list

damondouglas avatar Jan 15 '15 02:01 damondouglas