-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What should new URL("#")
return?
#539
Comments
We should add a test for this. Chrome and Safari are wrong, but they might have matched an earlier version of the standard that mistakenly used about:blank as the default base URL: c2980ee. Although that would not explain |
Thanks to confirm! |
To close this issue two things will need to be done that are relatively straightforward:
|
…ent tests, a=testonly Automatic update from web-platform-tests Test URLs with empty query and fragment Closes whatwg/url#539. Closes web-platform-tests/wpt#25829 by superseding it. Co-authored-by: Daijiro Wachi <[email protected]> -- wpt-commits: 6315c7757a6675f39262167c8196ce562f2a6778 wpt-pr: 29579
…ent tests, a=testonly Automatic update from web-platform-tests Test URLs with empty query and fragment Closes whatwg/url#539. Closes web-platform-tests/wpt#25829 by superseding it. Co-authored-by: Daijiro Wachi <[email protected]> -- wpt-commits: 6315c7757a6675f39262167c8196ce562f2a6778 wpt-pr: 29579
…ent tests, a=testonly Automatic update from web-platform-tests Test URLs with empty query and fragment Closes whatwg/url#539. Closes web-platform-tests/wpt#25829 by superseding it. Co-authored-by: Daijiro Wachi <[email protected]> -- wpt-commits: 6315c7757a6675f39262167c8196ce562f2a6778 wpt-pr: 29579
…ent tests, a=testonly Automatic update from web-platform-tests Test URLs with empty query and fragment Closes whatwg/url#539. Closes web-platform-tests/wpt#25829 by superseding it. Co-authored-by: Daijiro Wachi <[email protected]> -- wpt-commits: 6315c7757a6675f39262167c8196ce562f2a6778 wpt-pr: 29579
What should be the result of
new URL("#")
?Browsers return different results.
In my understanding is that
new URL("#")
should throw a validation error.state value
base
isnull
(initial value)c
is#
Test results:
URL {href: "about:blank#", origin: "null", protocol: "about:", username: "", password: "", …}
URL {href: "about:blank#", origin: "null", protocol: "about:", username: "", password: "", …}
I can not found this test in wpt/url.
📝 Memo:
I've noticed this different result when comparing
aTag.href
withURL
object.Some
<a>
element starts with fragment like<a href="#fragment">
andnew URL(a.href)
got different results.However,
new URL(a.href, location.href)
is not problem.The text was updated successfully, but these errors were encountered: