Closed blimmer closed 8 years ago
Completely agree, and I am also ago with breaking the API for a saner future.
Sounds good - I've created an 0.4.0 milestone that will (at least at first) contain all the open issues. If we're going to rework this, we might as well tackle all the breaking changes and add tests as we go.
These two terms are so close and it's a bit confusing as to what they do. This is how it works currently:
allowUnload
The return of this function says whether or not we should call
canUnload()
. Its default behavior is to not check the result of thecanUnload
method if transitioning to a child route of the route to which theConfirmationMixin
is applied.canUnload
The return of this function says whether or not the page has dirty attributes that we should warn the user about via the onbeforeunload.
Proposal
As part of a breaking release, we change
allowUnload
toshouldCheckPageIsDirty
andcanUnload
topageIsDirty
. IMO this is much clearer as to what each of the functions is doing.Perhaps as part of this release we could also consider #10 since we'll already be breaking stuff.
@jasonmit thoughts?