From: Nicolas Coden Date: Tue, 2 Jan 2018 08:27:46 +0000 (+0100) Subject: docs: add docs in magellan about `updateHistory` option X-Git-Tag: v6.6.0~3^2~325^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10833%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git docs: add docs in magellan about `updateHistory` option --- 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).