Re: web intent semantics?

This is defined in section 3.1.2 and 3.2.1 in the spec:

"postResult
Only present when the Intent object is delivered to the Service page.
The payload passed to this method will be returned to the onSuccess
callback registered by the client page in the startActivity call (if
any). The payload must be an object upon which the structured clone
algorithm can be performed, including Transferables."

"The onSuccess handler, if any, will be called by the user agent if
the service is dispatched, processes the intent, and calls postResult
on the Intent object it receives. The handler will be invoked with one
parameter: the data received from the service."

Our draft API spells this out more noticeably; I haven't figured out
how to get the respec syntax to nest argument specs the way I'd like
to.


More to the gist of the thread, James is right: the effort so far is
at the API level, but just as important is the definition of message
types. This is one of timeless' suggested deliverables, and work on
that front would be greatly appreciated.

The invocation/delivery API is intentionally decoupled from those
formats, but documenting common ones is very important to bootstrap
the ecosystem.


On Tue, Feb 21, 2012 at 10:13 AM, Dave Raggett <dsr@w3.org> wrote:
> On 21/02/12 15:34, Paul Kinlan wrote:
>
>> The latest version of the spec if here:
>> http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html
>
> Thanks.
>
> That page doesn't explicitly define the onSuccess and onFailure call
> backs. By looking at postResults, and postFailure which take a single
> argument 'data', I presume, onSuccess and onFailure are the same, right?
>
> How does the client page determine the type of the result? This seems
> important as a service page could data in a number of formats, and the
> JavaScript typeof operator wouldn't be likely to be sufficient.
>
> It might be worth considering a means to convey an optional MIME type
> for the result, mirroring the ability to set the MIME type of the data
> passed from the client page to the service page.
>
> --
> Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
>

Received on Tuesday, 21 February 2012 20:25:11 UTC