mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:15:08 +00:00
LibWeb: Add the Web::URL namespace and move URLEncoder to it
This namespace will be used for all interfaces defined in the URL specification, like URL and URLSearchParams. This has the unfortunate side-effect of requiring us to use the fully qualified AK::URL name whenever we want to refer to the AK class, so this commit also fixes all such references.
This commit is contained in:
parent
2b78e227f2
commit
4629f2e4ad
54 changed files with 236 additions and 225 deletions
|
@ -41,7 +41,7 @@ WebSocketClientManager::WebSocketClientManager()
|
|||
{
|
||||
}
|
||||
|
||||
RefPtr<Protocol::WebSocket> WebSocketClientManager::connect(const URL& url)
|
||||
RefPtr<Protocol::WebSocket> WebSocketClientManager::connect(const AK::URL& url)
|
||||
{
|
||||
return m_websocket_client->connect(url);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ RefPtr<Protocol::WebSocket> WebSocketClientManager::connect(const URL& url)
|
|||
// https://html.spec.whatwg.org/multipage/web-sockets.html#the-websocket-interface
|
||||
DOM::ExceptionOr<NonnullRefPtr<WebSocket>> WebSocket::create_with_global_object(Bindings::WindowObject& window, const String& url)
|
||||
{
|
||||
URL url_record(url);
|
||||
AK::URL url_record(url);
|
||||
if (!url_record.is_valid())
|
||||
return DOM::SyntaxError::create("Invalid URL");
|
||||
if (!url_record.protocol().is_one_of("ws", "wss"))
|
||||
|
@ -61,7 +61,7 @@ DOM::ExceptionOr<NonnullRefPtr<WebSocket>> WebSocket::create_with_global_object(
|
|||
return WebSocket::create(window.impl(), url_record);
|
||||
}
|
||||
|
||||
WebSocket::WebSocket(DOM::Window& window, URL& url)
|
||||
WebSocket::WebSocket(DOM::Window& window, AK::URL& url)
|
||||
: EventTarget(static_cast<Bindings::ScriptExecutionContext&>(window.associated_document()))
|
||||
, m_window(window)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue