From 9d36453c60d3da32532e53b27734b4a0978b2011 Mon Sep 17 00:00:00 2001 From: Nicolas Coden Date: Tue, 2 Jan 2018 09:27:46 +0100 Subject: [PATCH] docs: add docs in magellan about `updateHistory` option --- docs/pages/magellan.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/pages/magellan.md b/docs/pages/magellan.md index 0c683b790..bd84393bb 100644 --- a/docs/pages/magellan.md +++ b/docs/pages/magellan.md @@ -86,3 +86,10 @@ This below example is a simplified version of the table of contents on the right ``` +--- + +## Browser history + +When the `data-deep-link` option is set to `true`, the active section of the magellan is recorded by adding a hash with the active magellan section ID to the browser URL. By default, magellan *replace* the browser history (using `history.replaceState()`). + +Modify this behavior by using attribute `data-update-history="true"` to *append* to the browser history (using `history.pushState()`). In the latter case the browser back button will track each section the magellan gone through (in most case, this is not recommended). -- 2.47.2