[whatwg] register*Handler and Web Intents

Ian Hickson ian at hixie.ch
Thu Aug 2 09:57:54 PDT 2012

On Thu, 2 Aug 2012, Henri Sivonen wrote:
> This is a severe violation of the Degrade Gracefully design principle. 
> Adopting your proposal would mean that pages that include the intent 
> element in head would parse significantly differently in browsers that 
> predate the HTML parsing algorithm or in browsers that implement it in 
> its current form. I believe that having the intent element break the 
> parser out of head in browsers that don't contain the parser differences 
> you implicitly propose would cause a lot of grief to Web authors and 
> would hinder the adoption of this feature.
> My concerns could be addressed in any of these three ways:
> 1) Rename <intent> to <link>
> 2) Rename <intent> to <meta>
> 3) Make <intent> have an end tag and make it placed in <body> rather than <head>

I'm pretty sure the short-term pain of introducing a new <head> element 
would be far lower than the long-term pain of either of those three 
solutions. _Far_ lower. <link> and <meta> already have tons of overloaded 
behaviours, but none of them come close to matching the set of attributes 
<intent> would need. So we'd be overloading them with yet another 
mechanism, further increasing author confusion for those elements forever. 
Having <intent> have an end tag is really ugly, since the element has no 
contents. We'd be forever requiring that authors add this dummy end tag 
that doesn't do anything, yet if forgotten causes all kinds of trouble in 
the DOM. Authors would try putting things inside it, further confusing 

But now consider the short-term cost of adding an element to the head. All 
it does is make a few elements in the <head> leak to the <body>. The page 
still works fine in legacy UAs (none of the elements only work in the 
<head>). The <intent> works fine in new browsers, isn't confusing, doesn't 
have any random vestigial end tags. The only difference is that in legacy 
UAs, some elements happen to be in the <body> instead of the <head>, but 
that's hardly a big hardship -- and it's easy to work around, you just 
put the <intent> elements last in the <head>, and then you can even use 
their position in the DOM as a way to detect support.

I really am unconvinced that this is "a lot of grief".

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list