[whatwg] Proposal: <intent> tag for Web Intents API

Sorry for the delay in replying.

Yes we are ok with it being in the body. ?Having the intent tag in the
body allows us to have a strong graceful degradation story for Web
Developers and Publishers. ?The <intent> tag in the body allows us to
do several nice things such as:

1.  Giving the user another way to handle the action and allowing for
custom styling of the element:
<intent action="http://webintents.org/share" ... style="background-color:red;">
  <p>Add our bookmarklet <a href="javascript:.......">Drag to bookmark
bar</a></p>
</intent>

2. We can add the script polyfil in seamlessly - conforming UA's will
ignore internal content, non-conforming UA's will treat it as an
element they should descend into and thus load the required script.
<intent ...>
  <!-- Load the polyfill shim -->
  <script src="http://webintents.org/webintents.min.js"></script>
</intent>

3. It opens up the possibility for intent specific sub-tags - much
like <source> in <video> that we might need in the future.

P

On Fri, Dec 16, 2011 at 2:18 PM, Adam Barth <w3c at adambarth.com> wrote:
>
> To be clear, you're ok with not being able to include the <intent>
> element in the <head>.
>
> Adam
>
>
> On Fri, Dec 16, 2011 at 2:13 PM, Paul Kinlan <paulkinlan at google.com> wrote:
> > I know James mentioned [1] that we are leaning towards having the tag
> > in the body which opens up the possibility of unsuported browsers
> > showing the content of the element. ?This had some general consensus
> > [2]
> >
> > [1] http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-December/034084.html
> > [2] http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-December/034087.html
> >
> > On Fri, Dec 16, 2011 at 9:44 PM, Adam Barth <w3c at adambarth.com> wrote:
> >> On Fri, Dec 16, 2011 at 11:35 AM, Paul Kinlan <paulkinlan at google.com> wrote:
> >>> There isn't always a href, if left out the value action should be
> >>> launched on the current page.
> >>>
> >>> We didn't want to add additional attributes to the meta tag or link
> >>> tag just for intents, this seems to open up the flood gates for future
> >>> platform features to also extend the meta syntax, the meta element
> >>> then just becomes a dumping ground. ?If the answer when defining a new
> >>> declarative standardized platform feature is to just arbitrarily add
> >>> new attributes to the meta data element we will get to a point where
> >>> either ?we have attributes that are used in multiple contexts or use
> >>> of basic attribute name spacing such as "intent-".
> >>>
> >>> Looking at the spec[1] it appears there would still be a relatively
> >>> large change to the html5 spec to accomodate these new attributes and
> >>> conditional parsing guidelines.
> >>>
> >>> A new tag is simple, concise and encapsulates the features and
> >>> requirements of the new platform feature and gives us scope to iterate
> >>> for future versions without stepping on the toes of the other features
> >>> that might use the meta tag.
> >>
> >> Does that mean you're not interested in declaring this information in
> >> the <head> ?
> >>
> >> Adam
> >>
> >>
> >>> [1] http://dev.w3.org/html5/spec/Overview.html#the-meta-elemen
> >>>
> >>> P
> >>>
> >>> On Fri, Dec 16, 2011 at 9:54 AM, Anne van Kesteren <annevk at opera.com> wrote:
> >>>>
> >>>> On Wed, 14 Dec 2011 23:05:37 +0100, Greg Billock <gbillock at google.com> wrote:
> >>>>>
> >>>>> The big ergonomic sticking point there is probably the |href|
> >>>>> attribute, which we envision
> >>>>> being able to do same-origin registration. Perhaps a similar <link
> >>>>> rel="intent"> tag
> >>>>> modification would be able to do that, though. Is that what you'd
> >>>>> suggest? Do you think
> >>>>> having two tags involved would be confusing?
> >>>>
> >>>>
> >>>> If there's always an href attribute you could just go for <link> instead. I think you should go for one element and just add attributes as required. And if we want to put inside <head> that would be either <meta> or <link>.
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Anne van Kesteren
> >>>> http://annevankesteren.nl/
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Paul Kinlan
> >>> Developer Advocate @ Google for Chrome and HTML5
> >>> G+: http://plus.ly/paul.kinlan
> >>> t: +447730517944
> >>> tw: @Paul_Kinlan
> >>> LinkedIn: http://uk.linkedin.com/in/paulkinlan
> >>> Blog: http://paul.kinlan.me
> >>> Skype: paul.kinlan
> >
> >
> >
> > --
> > Paul Kinlan
> > Developer Advocate @ Google for Chrome and HTML5
> > G+: http://plus.ly/paul.kinlan
> > t: +447730517944
> > tw: @Paul_Kinlan
> > LinkedIn: http://uk.linkedin.com/in/paulkinlan
> > Blog: http://paul.kinlan.me
> > Skype: paul.kinlan




--
Paul Kinlan
Developer Advocate @ Google for Chrome and HTML5
G+: http://plus.ly/paul.kinlan
t: +447730517944
tw: @Paul_Kinlan
LinkedIn: http://uk.linkedin.com/in/paulkinlan
Blog: http://paul.kinlan.me
Skype: paul.kinlan

Received on Wednesday, 25 January 2012 12:04:26 UTC