Prechádzať zdrojové kódy

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

We'll need this from the Navigation API
Andrew Kaster 1 rok pred
rodič
commit
b07badb832

+ 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
-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.
     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;
 };
 
+bool can_have_its_url_rewritten(DOM::Document const& document, AK::URL const& target_url);
+
 }