You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dd><p>The index of this <code>NavigationHistoryEntry</code> within <code data-x="dom-Navigation-entries">navigation.entries()</code>, or −1 if the entry is not in the navigation history entry list.</p></dd>
<dd><p>Indicates whether or not this navigation history entry is for the same <code>Document</code> as the current one, or not. This will be true, for exampel, when the entry represents a fragment navigation or single-page app navigation.</p></dd>
87064
+
<dd><p>Indicates whether or not this navigation history entry is for the same <code>Document</code> as the current one, or not. This will be true, for example, when the entry represents a fragment navigation or single-page app navigation.</p></dd>
<p>(Notably, this will be null even for "<code data-x="dom-NavigationType-reload">reload</code>" or "<code data-x="dom-NavigationType-traverse">traverse</code>" navigations that are revisiting a <span>session history entry</span> that was originally created from a form submission.)</p>
<p>Represents whether or not this navigation was requested to be a download, by using an <code>a</code> or <code>area</code> element's <code data-x="attr-hyperlink-download">download</code> attribute:</p>
88042
+
88043
+
<ul>
88044
+
<li><p>If a download was not requested, then this property is null.</p></li>
88045
+
88046
+
<li><p>If a download was requested, returns the filename that was supplied as the <code data-x="attr-hyperlink-download">download</code> attribute's value. (This could be the empty string.)</p></li>
88047
+
</ul>
88048
+
88049
+
<p>Note that a download being requested does not always mean that a download will happen: for example, a download might be blocked by browser security policies, or end up being treated as a "<code data-x="hh-push">push</code>" navigation for <a href="https://github.com/whatwg/html/issues/7718" class="XXX">unspecified reasons</a>.</p>
88050
+
88051
+
<p>Similarly, a navigation might end up being a download even if it was not requested to be one, due to the destination server responding with a `<code data-x="http-content-disposition">Content-Disposition: attachment</code>` header.</p>
88052
+
88053
+
<p>Finally, note that the <code data-x="event-navigate">navigate</code> event will not fire at all for downloads initiated using browser UI affordances, e.g., those created by right-clicking and choosing to save the target of a link.</p>
<dd><p>An arbitrary JavaScript value passed via one of the <a href="#navigation-api-initiating-navigations">navigation API methods</a> which initiated this navigation, or undefined if the navigation was initiated by the user or by a different API.</p></dd>
<p>Intercepts this navigation, preventing its normal handling and instead converting it into a same-document navigation of the same type to the destination URL.</p>
88062
+
88063
+
<p>The <code data-x="dom-NavigationInterceptOptions-handler">handler</code> option can be a function that returns a promise. The handler function will run after the <code data-x="event-navigate">navigate</code> event has finished firing, and the <code data-x="dom-Navigation-currentEntry">navigation.currentEntry</code> property has been synchronously updated. This returned promise is used to signal the duration, and success or failure, of the navigation. After it settles, the browser signals to the user (e.g., via a loading spinner UI, or assistive technology) that the navigation is finished. Additionally, it fires <code data-x="event-navigatesuccess">navigatesuccess</code> or <code data-x="event-navigateerror">navigateerror</code> events as appropriate, which other parts of the web application can respond to.</p>
88064
+
88065
+
<p>By default, using this method will cause focus to reset when any handlers' returned promises settle. Focus will be reset to the first element with the <code data-x="attr-fe-autofocus">autofocus</code> attribute set, or <span>the body element</span> if the attribute isn't present. The <code data-x="dom-NavigationInterceptOptions-focusReset">focusReset</code> option can be set to "<code data-x="dom-NavigationFocusReset-manual">manual</code>" to avoid this behavior.</p>
88066
+
88067
+
<p>By default, using this method will delay the browser's scroll restoration logic for "<code data-x="dom-NavigationType-traverse">traverse</code>" or "<code data-x="dom-NavigationType-reload">reload</code>" navigations, or its scroll-reset/scroll-to-a-fragment logic for "<code data-x="dom-NavigationType-push">push</code>" or "<code data-x="dom-NavigationType-replace">replace</code>" navigations, until any handlers' returned promises settle. The <code data-x="dom-NavigationInterceptOptions-scroll">scroll</code> option can be set to "<code data-x="dom-NavigationScrollBehavior-manual">manual</code>" to turn off any browser-driven scroll behavior entirely for this navigation, or <code data-x="dom-NavigateEvent-scroll">scroll()</code> can be called before the promise settles to trigger this behavior early.</p>
88068
+
88069
+
<p>This method will throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code> if <code data-x="dom-NavigateEvent-canIntercept">canIntercept</code> is false, or if <code data-x="dom-Event-isTrusted">isTrusted</code> is false. It will throw an <span>"<code>InvalidStateError</code>"</span> <code>DOMException</code> if not called synchronously, during event dispatch.</p>
<p>For "<code data-x="dom-NavigationType-traverse">traverse</code>" or "<code data-x="dom-NavigationType-reload">reload</code>" navigations, restores the scroll position using the browser's usual scroll restoration logic.</p>
88075
+
88076
+
<p>For "<code data-x="dom-NavigationType-push">push</code>" or "<code data-x="dom-NavigationType-replace">replace</code>" navigations, either resets the scroll position to the top of the document or scrolls to the <span data-x="concept-url-fragment">fragment</span> specified by <code data-x="dom-NavigationDestination-url">destination.url</code> if there is one.</p>
88077
+
88078
+
<p>If called more than once, or called after automatic post-transition scroll processing has happened due to the <code data-x="dom-NavigationInterceptOptions-scroll">scroll</code> option bieng left as "<code data-x="dom-NavigationScrollBehavior-after-transition">after-transition</code>", this method will throw an <span>"<code>InvalidStateError</code>"</span> <code>DOMException</code>.</p>
<dd><p>The value of the <code data-x="dom-NavigationHistoryEntry-key">key</code> property of the destination <code>NavigationHistoryEntry</code>, if this is a "<code data-x="dom-NavigationType-traverse">traverse</code>" navigation, or null otherwise. </p></dd>
<dd><p>The value of the <code data-x="dom-NavigationHistoryEntry-id">id</code> property of the destination <code>NavigationHistoryEntry</code>, if this is a "<code data-x="dom-NavigationType-traverse">traverse</code>" navigation, or null otherwise. </p></dd>
<dd><p>The value of the <code data-x="dom-NavigationHistoryEntry-index">index</code> property of the destination <code>NavigationHistoryEntry</code>, if this is a "<code data-x="dom-NavigationType-traverse">traverse</code>" navigation, or −1 otherwise. </p></dd>
<p>Indicates whether or not this navigation is to the same <code>Document</code> as the current one, or not. This will be true, for example, in the case of fragment navigations or <code data-x="dom-history-pushState">history.pushState()</code> navigations.</p>
88134
+
88135
+
<p>Note that this property indicates the original nature of the navigation. If a cross-document navigation is converted into a same-document navigation using <code data-x="dom-NavigateEvent-intercept">navigateEvent.intercept()</code>, that will not change the value of this property.</p>
<p>For "<code data-x="dom-NavigationType-traverse">traverse</code>" navigations, returns the <span data-x="StructuredDeserialize">deserialization</span> of the state stored in the destination <span>session history entry</span>.</p>
88141
+
88142
+
<p>For "<code data-x="dom-NavigationType-push">push</code>" or "<code data-x="dom-NavigationType-replace">replace</code>" navigations, returns the <span data-x="StructuredDeserialize">deserialization</span> of the state passed to <code data-x="dom-Navigation-navigate">navigation.navigate()</code>, if the navigation was initiated by that method, or undefined it if it wasn't.</p>
<p>For "<code data-x="dom-NavigationType-reload">reload</code>" navigations, returns the <span data-x="StructuredDeserialize">deserialization</span> of the state passed to <code data-x="dom-Navigation-reload">navigation.reload()</code>, if the reload was initiated by that method, or undefined it if it wasn't.</p>
88145
+
</dd>
88146
+
</dl>
88147
+
88148
+
<p>Each <code>NavigationDestination</code> has a <dfn data-x="concept-NavigationDestination-url">URL</dfn>, which is a <span>URL</span>.</p>
88149
+
88150
+
<p>Each <code>NavigationDestination</code> has a <dfn data-x="concept-NavigationDestination-key">key</dfn>, which is a string or null.</p>
88151
+
88152
+
<p>Each <code>NavigationDestination</code> has an <dfn data-x="concept-NavigationDestination-id">ID</dfn>, which is a string or null.</p>
88153
+
88154
+
<p>Each <code>NavigationDestination</code> has an <dfn data-x="concept-NavigationDestination-index">index</dfn>, which is an integer.</p>
<p>Each <code>NavigationDestination</code> has a <dfn data-x="concept-NavigationDestination-state">state</dfn>, which is a <span>serialized state</span>.</p>
<p>Each <code>NavigationDestination</code> has an <dfn data-x="concept-NavigationDestination-sameDocument">is same document</dfn>, which is a boolean.</p>
<p>The <dfn attribute for="NavigationDestination"><code data-x="dom-NavigationDestination-key">key</code></dfn> getter steps are to return <span>this</span>'s <span data-x="concept-NavigationDestination-key">key</span>.</p>
88163
+
88164
+
<p>The <dfn attribute for="NavigationDestination"><code data-x="dom-NavigationDestination-id">id</code></dfn> getter steps are to return <span>this</span>'s <span data-x="concept-NavigationDestination-id">ID</span>.</p>
88165
+
88166
+
<p>The <dfn attribute for="NavigationDestination"><code data-x="dom-NavigationDestination-index">index</code></dfn> getter steps are to return <span>this</span>'s <span data-x="concept-NavigationDestination-index">index</span>.</p>
88167
+
88168
+
<p>The <dfn attribute for="NavigationDestination"><code data-x="dom-NavigationDestination-sameDocument">sameDocument</code></dfn> getter steps are to return <span>this</span>'s <span data-x="concept-NavigationDestination-sameDocument">is same document</span>.</p>
88169
+
88170
+
<p>The <dfn attribute for="NavigationDestination"><code data-x="dom-NavigationDestination-getState">getState()</code></dfn> method steps are to return <span>StructuredDeserialize</span>(<span>this</span>'s <span data-x="concept-NavigationDestination-state">state</span>).</p>
0 commit comments