W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2014

[whatwg] URL Statics questions

From: Sam Ruby <rubys@intertwingly.net>
Date: Fri, 28 Nov 2014 08:42:55 -0500
Message-ID: <54787BDF.3010705@intertwingly.net>
To: whatWG <whatwg@whatwg.org>

It is not clear to me what the use case is for these methods, which 
leads me to a a number of questions.

First, what does "static" mean in this context?  Is this the C++ meaning 
of static, i.e., "class methods".  So would the two methods being 
described map to the following in JavaScript?

   URL.domainToASCII = function(domain) {...}
   URL.domainToUnicode = function(domain) {...}

Are these methods implemented by any current browser?  Assuming we are 
talking about URL.domainToASCII, I didn't see it implemented in the 
first two browsers I checked (Chrome and Firefox).

Now to my real question: assuming we do IPv4 parsing per 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26431 (and incidentally, 
matching the Chrome implementation), what should these static methods 
return in the case of IPv4 addresses?

The reason why I'm asking is that I'm working on rewriting the URL 
parser per https://www.w3.org/Bugs/Public/show_bug.cgi?id=25946, and 
would like to update the https://url.spec.whatwg.org/#host-parsing to be 

- Sam Ruby
Received on Friday, 28 November 2014 13:43:21 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:26 UTC