Open kholdrex opened 1 week ago
Great work! I'll give this a test during the weekend, and merge.
This looks great! I'm marking this for a 1.0 release. I don't want to merge this in quite yet as I want to focus on the typescript conversion, but def on my radar!
https://github.com/thoughtbot/superglue/issues/62
This PR adds a new data attribute,
data-sg-replace
. This attribute allows for replacing the browser's history state instead of pushing a new state when navigating.Changes
visit
function to accept asuggestedAction
parameter.data-sg-replace
attribute in theHandlerBuilder
class.data-sg-replace
and pass the appropriate action.data-sg-replace
functionality.Tests
visit
is called with thereplace
action when thedata-sg-replace
attribute is present.suggestedAction
parameter.