Re: [whatwg] Making URLSearchParams set() `value` argument optional

2014-03-12 Thread Simon Sapin

On 12/03/2014 10:04, David Håsäther wrote:

I would like to propose making the `value` argument optional for
URLSearchParams set()[1]. This would work as set(name, ), but
would not output the equals sign, leading to nicer URLs.

So:

set(name, ) - ?name=
set(name) - ?name

Anne van Kesteren pointed out[2] that this is different from the
application/x-www-form-urlencoded serialization on which it currently
relies on. I'm not sure if that has any implications.

[1]http://url.spec.whatwg.org/#dom-urlsearchparams-set
[2]https://twitter.com/annevk/status/443576248166391808


Currently the application/x-www-form-urlencoded serializer takes a list 
of name-value pairs, where the name and the value are implied to be 
strings. We could change it to accept values that are null as well as 
strings. A pair with a null value would be serialized as just the name, 
without the equal sign.


So you could end up with  ?name1=value1name2name3=value3

HTML forms would just provide lists of pairs that never happen to 
include a null value.



The parser currently emits an empty strings when the input is missing an 
equal sign for a given pair. Assuming the above, I don’t know if it 
should be changed to emit a null value.


--
Simon Sapin


[whatwg] Adding obsolete elements/attributes to indexes

2014-01-23 Thread Simon Sapin

Hi,

The HTML spec has an Index section, with tables of all existing 
elements, attributes, and other things. I find this very helpful.


When considering what Servo should implement, I mistakenly concluded 
that li elements do not have a 'type' attribute, based on the Index. 
They in fact do, as specified in the Obsolete features section.


That such features are in the spec at all, even though authors must 
not use them, probably means that Servo needs to implement them. 
However these features are not mentioned at all outside of the Obsolete 
features section, to it’s not easy to discover that they even exist if 
one does not think of look for Obsolete features specifically.


To help with discoverability of obsolete features by implementers, I’d 
like them to be included in the Index section’s tables.


--
Simon Sapin


Re: [whatwg] Adding obsolete elements/attributes to indexes

2014-01-23 Thread Simon Sapin

On 23/01/2014 08:54, Ian Hickson wrote:

On Thu, 23 Jan 2014, Simon Sapin wrote:


To help with discoverability of obsolete features by implementers, I’d
like them to be included in the Index section’s tables.


They're explicitly excluded to help with avoiding their discovery by
authors.


I see. I still wish there was a version of the indexes for implementers :)



There's a link from any interface that has obsolete IDL members to the
partial interface that defines those members. As far as non-obsolete
elements go, I think the only requirements in the obsolete section are
regarding these obsolete IDL members.



When considering what Servo should implement, I mistakenly concluded
that li elements do not have a 'type' attribute, based on the Index.
They in fact do, as specified in the Obsolete features section.


Do you mean a type IDL attribute or a type content attribute? No IDL
attributes are listed in the index. I don't know what it really means for
an element to have a content attribute, from an implement's persective.


I’m talking about HTML attributes. In this case li type=AFoo/i 
affecting rendering compared to just liFoo/li.


Perhaps elements having an attribute is not the right term, but a 
content attribute having meaning for the UA?


--
Simon Sapin