diff --git a/Userland/Libraries/LibWeb/HTML/NavigationHistoryEntry.cpp b/Userland/Libraries/LibWeb/HTML/NavigationHistoryEntry.cpp index 4759d71363..40838e5c52 100644 --- a/Userland/Libraries/LibWeb/HTML/NavigationHistoryEntry.cpp +++ b/Userland/Libraries/LibWeb/HTML/NavigationHistoryEntry.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -100,9 +101,9 @@ i64 NavigationHistoryEntry::index() const if (!this_relevant_global_object.associated_document().is_fully_active()) return -1; - // FIXME 2. Return the result of getting the navigation API entry index of this's session history entry + // 2. Return the result of getting the navigation API entry index of this's session history entry // within this's relevant global object's navigation API. - return -1; + return this_relevant_global_object.navigation()->get_the_navigation_api_entry_index(*m_session_history_entry); } // https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationhistoryentry-samedocument