mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
In our implementation of url-initialize, we were invoking the constructor of URLSearchParams: https://url.spec.whatwg.org/#dom-urlsearchparams-urlsearchparams Instead of the 'initialize' AO: https://url.spec.whatwg.org/#urlsearchparams-initialize This has the small difference of stripping any leading '?' from the query (which we are not meant to be doing!).
332 lines
6.7 KiB
Plaintext
332 lines
6.7 KiB
Plaintext
new URL('ftp://serenityos.org:21', undefined)
|
|
protocol => 'ftp:'
|
|
username => ''
|
|
password => ''
|
|
host => 'serenityos.org'
|
|
hostname => 'serenityos.org'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('http://[0:1:0:1:0:1:0:1]', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => '[0:1:0:1:0:1:0:1]'
|
|
hostname => '[0:1:0:1:0:1:0:1]'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('http://[1:0:1:0:1:0:1:0]', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => '[1:0:1:0:1:0:1:0]'
|
|
hostname => '[1:0:1:0:1:0:1:0]'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('http://[1:1:0:0:1:0:0:0]/', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => '[1:1:0:0:1::]'
|
|
hostname => '[1:1:0:0:1::]'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('unknown://serenityos.org:0', undefined)
|
|
protocol => 'unknown:'
|
|
username => ''
|
|
password => ''
|
|
host => 'serenityos.org:0'
|
|
hostname => 'serenityos.org'
|
|
port => '0'
|
|
pathname => ''
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('http://serenityos.org/cat?dog#meow"woof', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'serenityos.org'
|
|
hostname => 'serenityos.org'
|
|
port => ''
|
|
pathname => '/cat'
|
|
search => '?dog'
|
|
searchParams => 'dog='
|
|
hash => '#meow%22woof'
|
|
new URL('/hello', 'file://friends/')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => 'friends'
|
|
hostname => 'friends'
|
|
port => ''
|
|
pathname => '/hello'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('//d:/..', 'file:///C:/a/b')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => ''
|
|
hostname => ''
|
|
port => ''
|
|
pathname => '/d:/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('file://a%C2%ADb/p', undefined)
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => 'ab'
|
|
hostname => 'ab'
|
|
port => ''
|
|
pathname => '/p'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('http://user%20name:pa%40ss%3Aword@www.ladybird.org', undefined)
|
|
protocol => 'http:'
|
|
username => 'user%20name'
|
|
password => 'pa%40ss%3Aword'
|
|
host => 'www.ladybird.org'
|
|
hostname => 'www.ladybird.org'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'host:9000'
|
|
hostname => 'host'
|
|
port => '9000'
|
|
pathname => '/path'
|
|
search => '?query'
|
|
searchParams => 'query='
|
|
hash => '#frag'
|
|
new URL(' \t', 'http://ladybird.org/foo/bar')
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'ladybird.org'
|
|
hostname => 'ladybird.org'
|
|
port => ''
|
|
pathname => '/foo/bar'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('/c:/foo/bar', 'file:///c:/baz/qux')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => ''
|
|
hostname => ''
|
|
port => ''
|
|
pathname => '/c:/foo/bar'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
new URL('', 'file:///test?test#test')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => ''
|
|
hostname => ''
|
|
port => ''
|
|
pathname => '/test'
|
|
search => '?test'
|
|
searchParams => 'test='
|
|
hash => ''
|
|
new URL('??a=b&c=d', 'http://example.org/foo/bar')
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'example.org'
|
|
hostname => 'example.org'
|
|
port => ''
|
|
pathname => '/foo/bar'
|
|
search => '??a=b&c=d'
|
|
searchParams => '%3Fa=b&c=d'
|
|
hash => ''
|
|
=========================================
|
|
URL.parse('ftp://serenityos.org:21', undefined)
|
|
protocol => 'ftp:'
|
|
username => ''
|
|
password => ''
|
|
host => 'serenityos.org'
|
|
hostname => 'serenityos.org'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('http://[0:1:0:1:0:1:0:1]', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => '[0:1:0:1:0:1:0:1]'
|
|
hostname => '[0:1:0:1:0:1:0:1]'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('http://[1:0:1:0:1:0:1:0]', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => '[1:0:1:0:1:0:1:0]'
|
|
hostname => '[1:0:1:0:1:0:1:0]'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('http://[1:1:0:0:1:0:0:0]/', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => '[1:1:0:0:1::]'
|
|
hostname => '[1:1:0:0:1::]'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('unknown://serenityos.org:0', undefined)
|
|
protocol => 'unknown:'
|
|
username => ''
|
|
password => ''
|
|
host => 'serenityos.org:0'
|
|
hostname => 'serenityos.org'
|
|
port => '0'
|
|
pathname => ''
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('http://serenityos.org/cat?dog#meow"woof', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'serenityos.org'
|
|
hostname => 'serenityos.org'
|
|
port => ''
|
|
pathname => '/cat'
|
|
search => '?dog'
|
|
searchParams => 'dog='
|
|
hash => '#meow%22woof'
|
|
URL.parse('/hello', 'file://friends/')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => 'friends'
|
|
hostname => 'friends'
|
|
port => ''
|
|
pathname => '/hello'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('//d:/..', 'file:///C:/a/b')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => ''
|
|
hostname => ''
|
|
port => ''
|
|
pathname => '/d:/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('file://a%C2%ADb/p', undefined)
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => 'ab'
|
|
hostname => 'ab'
|
|
port => ''
|
|
pathname => '/p'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('http://user%20name:pa%40ss%3Aword@www.ladybird.org', undefined)
|
|
protocol => 'http:'
|
|
username => 'user%20name'
|
|
password => 'pa%40ss%3Aword'
|
|
host => 'www.ladybird.org'
|
|
hostname => 'www.ladybird.org'
|
|
port => ''
|
|
pathname => '/'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg', undefined)
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'host:9000'
|
|
hostname => 'host'
|
|
port => '9000'
|
|
pathname => '/path'
|
|
search => '?query'
|
|
searchParams => 'query='
|
|
hash => '#frag'
|
|
URL.parse(' \t', 'http://ladybird.org/foo/bar')
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'ladybird.org'
|
|
hostname => 'ladybird.org'
|
|
port => ''
|
|
pathname => '/foo/bar'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('/c:/foo/bar', 'file:///c:/baz/qux')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => ''
|
|
hostname => ''
|
|
port => ''
|
|
pathname => '/c:/foo/bar'
|
|
search => ''
|
|
searchParams => ''
|
|
hash => ''
|
|
URL.parse('', 'file:///test?test#test')
|
|
protocol => 'file:'
|
|
username => ''
|
|
password => ''
|
|
host => ''
|
|
hostname => ''
|
|
port => ''
|
|
pathname => '/test'
|
|
search => '?test'
|
|
searchParams => 'test='
|
|
hash => ''
|
|
URL.parse('??a=b&c=d', 'http://example.org/foo/bar')
|
|
protocol => 'http:'
|
|
username => ''
|
|
password => ''
|
|
host => 'example.org'
|
|
hostname => 'example.org'
|
|
port => ''
|
|
pathname => '/foo/bar'
|
|
search => '??a=b&c=d'
|
|
searchParams => '%3Fa=b&c=d'
|
|
hash => ''
|