- From: Anne van Kesteren <annevk@annevk.nl>
- Date: Fri, 10 Oct 2014 09:23:32 +0200
- To: Sam Ruby <rubys@intertwingly.net>
- Cc: TAG <www-tag@w3.org>
On Thu, Oct 9, 2014 at 10:32 PM, Sam Ruby <rubys@intertwingly.net> wrote: > That page describes URLUtils.pathname as "a DOMString containing an initial > '/' followed by the path of the URL." Yeah, it's a MDN document and those are usually light on details and focus on the typical case. Which would be http/https URLs. > Here are test cases where Firefox 32 and Chrome 37 produce different > results, neither of which start with an initial '/': > > http://intertwingly.net/stories/2014/10/05/urltest-results/8e738a5350 > http://intertwingly.net/stories/2014/10/05/urltest-results/010d3b8e54 > http://intertwingly.net/stories/2014/10/05/urltest-results/f95c57aa35 Note that per the URL Standard none of these schemes have paths, they have scheme data. > There are also plenty of examples where the URL is badly formed and an empty > string is returned by both. A few examples: > > http://intertwingly.net/stories/2014/10/05/urltest-results/8e4dba714b > http://intertwingly.net/stories/2014/10/05/urltest-results/a7e821cc81 > http://intertwingly.net/stories/2014/10/05/urltest-results/aa0a198c57 > http://intertwingly.net/stories/2014/10/05/urltest-results/723aa80622 Again, exceptional cases, not something MDN typically worries about. > The developer.mozilla.org page indicates that Chrome, Firefox, and IE has > "basic support", without defining what that means. I will note that out of > the 256 tests defined for URL spec, there isn't a single one where those > three browsers return the same value for pathname. I would not expect a test suite to cover the easy cases. However, the results you have for IE seem wrong. E.g. I tested http://intertwingly.net/stories/2014/10/05/urltest-results/a55728423e in IE10 and I get a "/". I ran this in Live DOM Viewer: <a href=/>test</a> <script> w(document.querySelector("a").pathname) </script> > Before anybody attempts to infer what point I am trying to make, I'll make > it clear: > > * Readers of this page will be done a disservice in that the information > isn't technically accurate nor does it adequately capture the state of > interop. You make grand claims, but spot tests reveal issues each time. -- https://annevankesteren.nl/
Received on Friday, 10 October 2014 07:24:00 UTC