Re: [websockets] Binary support changes

2011-05-30 Thread Simon Pieters
On Sat, 28 May 2011 00:55:03 +0200, Adrian Bateman adria...@microsoft.com wrote: I'm pleased to see the changes in the WebSockets API for binary message support. I'm a little confused by this text: When a WebSocket object is created, its binaryType IDL attribute must be set to the

Re: [websockets] Binary support changes

2011-05-30 Thread Aryeh Gregor
On Mon, May 30, 2011 at 3:20 AM, Simon Pieters sim...@opera.com wrote: http://www.w3.org/Bugs/Public/show_bug.cgi?id=12805 I agree, using interface object complicates things when working across globals (you basically need to pass along the global as well which is uglier than using a string).

[websockets] Binary support changes

2011-05-27 Thread Adrian Bateman
I'm pleased to see the changes in the WebSockets API for binary message support. I'm a little confused by this text: When a WebSocket object is created, its binaryType IDL attribute must be set to the Blob interface object associated with the same global object as the WebSocket

Re: [websockets] Binary support changes

2011-05-27 Thread Ian Hickson
On Fri, 27 May 2011, Adrian Bateman wrote: I'm pleased to see the changes in the WebSockets API for binary message support. I'm a little confused by this text: When a WebSocket object is created, its binaryType IDL attribute must be set to the Blob interface object associated with

Re: [websockets] Binary support changes

2011-05-27 Thread Cameron McCormack
Ian Hickson: Consistency is good when it makes sense. However, I don't think XHR is a good parallel here. XHR has all kinds of additional complexities, for example it lets you get a string, whereas here string vs binary is handled at the protocol level and so can't ever be confused.

Re: [websockets] Binary support changes

2011-05-27 Thread Jonas Sicking
On Fri, May 27, 2011 at 4:02 PM, Ian Hickson i...@hixie.ch wrote: On Fri, 27 May 2011, Adrian Bateman wrote: I'm pleased to see the changes in the WebSockets API for binary message support. I'm a little confused by this text:     When a WebSocket object is created, its binaryType IDL

Re: [websockets] Binary support changes

2011-05-27 Thread Ian Hickson
On Sat, 28 May 2011, Cameron McCormack wrote: Ian Hickson: Consistency is good when it makes sense. However, I don't think XHR is a good parallel here. XHR has all kinds of additional complexities, for example it lets you get a string, whereas here string vs binary is handled at the

Re: [websockets] Binary support changes

2011-05-27 Thread Ian Hickson
On Fri, 27 May 2011, Jonas Sicking wrote: I agree that the WebSocket solution looks cleaner in the simple cases. However it introduces complexity for the case when the script is dealing with multiple globals. For example, what is an implementation supposed to do if a page does:

RE: [websockets] Binary support changes

2011-05-27 Thread Adrian Bateman
On Friday, May 27, 2011 4:23 PM, Jonas Sicking wrote: However, I think there might be another solution to this whole situation. There really is no reason that only binary data can be received as a Blob. Getting data as a Blob is useful any time you're dealing with a large chunk of data where

RE: [websockets] Binary support changes

2011-05-27 Thread Adrian Bateman
On Friday, May 27, 2011 4:30 PM, Ian Hickson wrote: On Fri, 27 May 2011, Jonas Sicking wrote: For example, what is an implementation supposed to do if a page does: ws.binaryType = otherwindow.ArrayBuffer or otherwindow.useThis(ws); with other window containing function

Re: [websockets] Binary support changes

2011-05-27 Thread Jonas Sicking
On Fri, May 27, 2011 at 4:29 PM, Ian Hickson i...@hixie.ch wrote: On Fri, 27 May 2011, Jonas Sicking wrote: I agree that the WebSocket solution looks cleaner in the simple cases. However it introduces complexity for the case when the script is dealing with multiple globals. For example, what