Skip to content

Commit

Permalink
Update index.md (mdn#22416)
Browse files Browse the repository at this point in the history
Added a missing parenthesis
  • Loading branch information
blake-celestian authored and hamishwillee committed Dec 9, 2022
1 parent 33e3263 commit 55753f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/popstate_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ When a navigation occurs — either due to the user triggering the browser's <kb
To better understand when the `popstate` event is fired, consider this simplified sequence of events that occurs when the current history entry changes due to either the user navigating the site or the history being traversed programmatically. Here, the transition is changing the current history entry to one we'll refer to as **new-entry**. The current page's session history stack entry will be referred to as **current-entry**.

1. If **new-entry** doesn't currently contain an existing {{domxref("Document")}}, fetch the content and create its `Document` before continuing. This will eventually send events such as {{domxref("Window.DOMContentLoaded_event", "DOMContentLoaded")}} and {{domxref("Window.load_event", "load")}} to the {{domxref("Window")}} containing the document, but the steps below will continue to execute in the meantime.
2. If **current-entry**'s title wasn't set using one of the History API methods ({{domxref("History.pushState", "pushState()")}} or {{domxref("History.replaceState", "replaceState()")}}, set the entry's title to the string returned by its {{domxref("document.title")}} attribute.
2. If **current-entry**'s title wasn't set using one of the History API methods ({{domxref("History.pushState", "pushState()")}} or {{domxref("History.replaceState", "replaceState()")}}), set the entry's title to the string returned by its {{domxref("document.title")}} attribute.
3. If the browser has state information it wishes to store with the **current-entry** before navigating away from it, it then does so. The entry is now said to have "persisted user state." This information the browser might add to the history session entry may include, for instance, the document's scroll position, the values of form inputs, and other such data.
4. If **new-entry** has a different `Document` object than **current-entry**, the browsing context is updated so that its {{domxref("Window.document", "document")}} property refers to the document referred to by **new-entry**, and the context's name is updated to match the context name of the now-current document.
5. Each form control within **new-entry**'s {{domxref("Document")}} that has {{htmlattrxref("autocomplete", "input")}} configured with its autofill field name set to `off` is reset. See [The HTML autocomplete attribute](/en-US/docs/Web/HTML/Attributes/autocomplete) for more about the autocomplete field names and how autocomplete works.
Expand Down

0 comments on commit 55753f6

Please sign in to comment.