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

View#serialize Enhancement #330

Open
gf3 opened this issue Mar 6, 2014 · 1 comment
Open

View#serialize Enhancement #330

gf3 opened this issue Mar 6, 2014 · 1 comment
Labels
Milestone

Comments

@gf3
Copy link
Contributor

gf3 commented Mar 6, 2014

Ran into an issue the other day of trying to detect the case when a serialize fails (due to validateInput returning errors). I had resorted to a once listener for the invalid event and then cancelling the listener if serialize passes.

I think a better solution would be for serialize to either return a promise or accept an error callback (or both—success and error callbacks could be sugar on a promise).

Anyway, I'd be willing to submit this patch, I just wanted to gauge interest first.

Thoughts?

@kpdecker
Copy link
Contributor

promises: we're not going to convert a single API to this due to both overhead of including a promises library and having just one API using promises is weird.

callback: This seems reasonable as there is already another callback here. Glad to look at a PR.

@kpdecker kpdecker added this to the Backlog milestone Nov 30, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants