-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: finalize.callback called with result
As `finalize` is called with `triggerHandler` we can read back the result from the handlers and forward to the `finalize` callback. This means we can now do this: ```javascript var Widget = require("mu-jquery-widget/widget"); var W = Widget.extend({ "on/finalize": function ($event, finalized) { finalized(function(result) { console.log(result === "result" // true }); return "result"; } }); var w = new W($("<div>", "ns"); w.remove(); ``` BREAKING CHANGE: The removal of event handlers in `finalize` is removed in this commit as it's just as easy to do `w.off()` on your own when needed.
- Loading branch information
1 parent
647314b
commit 05a5db9
Showing
2 changed files
with
12 additions
and
47 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