Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Support Promises as model properties #207

Open
jyasskin opened this issue Dec 17, 2014 · 0 comments
Open

Support Promises as model properties #207

jyasskin opened this issue Dec 17, 2014 · 0 comments

Comments

@jyasskin
Copy link

http://jsbin.com/meganuceli/5/edit has an example based on the <core-ajax> demo that tries to bind a template to a Promise-valued model. Obviously that doesn't work, and users have to instead do something like http://jsbin.com/meganuceli/6/edit that assigns the model after the Promise resolves. However, this is vulnerable to races where a user changes the state of the application, the application updates the Promises that fill in the model, but then an outdated Promise resolves after the up-to-date one does, and overwrites its output: http://jsbin.com/hesivoseyu/3/edit

It would be nice for Polymer to support Promises directly so that it would take less code to fill in the model and so that this race would happen less often.

cc @slightlyoff

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant