-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #124: Use ES6 Promises instead of lavaca/util/Promise
Using [this Promise API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise): - Updated all functions which were directly constructing lavaca/util/Promise instances to construct Promise instances instead - Updated all functions calling a `.then`, `.always`, `.success`, or `.error` method to only use ES6-compliant `.then` or `.catch` methods. - Updated unit tests I did skip updating lavaca/ui/Form and its unit tests... I'm somewhat sure it will be removed in issue #121. *Side effect*: ES6-ifying `mvc/View#render` into "sequential-looking" `.then` chains resulted in removing two methods: - `mvc/View#renderTemplate` because it boiled down to one statement: `template.render(model)` - `mvc/View#bindRenderEvents` because it de-duplicated adding 'rendersuccess' and 'rendererror' onto the end of `render()` and `renderPageView()` at the expense of code flow readability imo. As an aside, I suspect we might be able to dedupe the entire `render()` and `renderPageView()` methods. *Side effect*: lavaca/util/Map: synchronous AJAX is incompatible with ES6 Promises because they force asynchronicity. Change lavaca/util/Map to return a (non-ES6) jQuery Promise instead.
- Loading branch information
Showing
25 changed files
with
847 additions
and
1,130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.