浏览代码

LibWeb: Make the can have its url rewritten AO publicly accessible

We'll need this from the Navigation API
Andrew Kaster 1 年之前
父节点
当前提交
b07badb832
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/HTML/History.cpp
  2. 2 0
      Userland/Libraries/LibWeb/HTML/History.h

+ 1 - 1
Userland/Libraries/LibWeb/HTML/History.cpp

@@ -110,7 +110,7 @@ WebIDL::ExceptionOr<void> History::forward()
 }
 }
 
 
 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#can-have-its-url-rewritten
 // https://html.spec.whatwg.org/multipage/nav-history-apis.html#can-have-its-url-rewritten
-static bool can_have_its_url_rewritten(DOM::Document const& document, AK::URL const& target_url)
+bool can_have_its_url_rewritten(DOM::Document const& document, AK::URL const& target_url)
 {
 {
     // 1. Let documentURL be document's URL.
     // 1. Let documentURL be document's URL.
     auto document_url = document.url();
     auto document_url = document.url();

+ 2 - 0
Userland/Libraries/LibWeb/HTML/History.h

@@ -42,4 +42,6 @@ private:
     JS::NonnullGCPtr<DOM::Document> m_associated_document;
     JS::NonnullGCPtr<DOM::Document> m_associated_document;
 };
 };
 
 
+bool can_have_its_url_rewritten(DOM::Document const& document, AK::URL const& target_url);
+
 }
 }