W3C home > Mailing lists > Public > public-secondscreen@w3.org > March 2015

Re: [presentation-api] First version of postMessage and onmessage algorithms

From: Mark Foltz via GitHub <sysbot+gh@w3.org>
Date: Fri, 06 Mar 2015 21:45:13 +0000
To: public-secondscreen@w3.org
Message-ID: <issue_comment.created-77641805-1425678312-sysbot+gh@w3.org>
Thanks for putting this together, comments:

Indent the following to match the rest of the definition.   Also the 
first instance of 'postMessage' is bold while other declarations are 

// Communication
attribute BinaryType binaryType;
EventHandler onmessage;
void postMessage (DOMString message);
void postMessage (Blob data);
void postMessage (ArrayBuffer data);
void postMessage (ArrayBufferView data);

> the data contents of a transmission between two browsing contexts

Does this mean a single invocation of `postMessage()`?  I think it 
would be permissible for the implementation to fragment transmission 
(e.g. to meet the requirements of a network transport) of a single 
message.  Can it be clarified?

> Let presentation message format be the format of that data, one of 
Text and Binary.

I think of this as a type, not a format; the text data could be sent 
in a binary format if the implementation chooses.  So maybe: "Let 
*presentation message type* be the type of that data, one of `text` or

> (Set to Binary if data is one of ArrayBuffer or Blob. Set to Text if
 data is of type DOMString)

This would be clearer as its own step.

> to the remote side, i.e. from opening browsing context to 
presentation browsing context or vice versa

Maybe just "to the destination browsing context"?  Or have a step that
 defines the destination context for the data?

>the URL that the opening browsing context and the presenting browsing
 context have in common.

What if they have no URL in common?

> If the presentation message format is Text, then initialize event's 
data attribute to the contents of  presentation message data.

....as a DOMString?


GitHub Notif of comment by mfoltzgoogle
Received on Friday, 6 March 2015 21:45:23 UTC

This archive was generated by hypermail 2.3.1 : Friday, 6 March 2015 21:45:23 UTC