[whatwg] Outstanding URL bugs

I won't have much time to work on URLs until July most likely.
However, I was asked to provide an update of sorts with respect to
changes that are planned:

* Support relative URLs outside of the whitelist of relative schemes.
We'll still need special parsing rules for the relative schemes, and
we'll need to blacklist some other schemes, such as data and
javascript, but we can support relative URLs for random schemes and
make sure ../test can be resolved against test://test/x/.

* Support IPv4 including addresses such as http://2/ by normalizing them.

* Fix the outstanding issues with file URLs. Perhaps we need to
acknowledge the Unix / Windows mode switch although it seems somewhat
sad to depend on global state in that way.

* No longer default base URL to "about:blank". Boris pointed out that
even with "about:blank" some relative URLs ought to work, such as
"#test", which would mean you could no longer use new URL() to only
succeed for absolute URLs. (I might try to fix this one sooner.)

I've also been thinking of rewriting the parser from being state-based
to function-based, though a recent new URL implementation
https://github.com/jsdom/whatwg-url is state-based so maybe the
current setup is okay.


-- 
https://annevankesteren.nl/

Received on Tuesday, 5 May 2015 07:25:33 UTC