W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Websockets Client API

From: Bruce Atherton <bruce@callenish.com>
Date: Sun, 20 Feb 2011 17:39:27 -0800
Message-ID: <4D61C24F.9000606@callenish.com>
Sorry, I don't understand what you mean. The constructor is not throwing 
an exception in this case. The issue I am concerned with is that the 
Websocket object can potentially be used before it has been configured 
with event handlers, although it sounds like that may not be an issue in 

To my mind there are two solutions: include an event-handler collection 
as a parameter on all the constructor methods, or separate the open() 
call out from the constructor. For my library I think I'll opt for the 
latter option.

On 20/02/2011 4:28 PM, Anthony Papillion wrote:
> Forgive me if I'm overlooking something here but couldn't the same thing
> be accomplished by wrapping the constructor code in a try/catch block?
> Anthony
Received on Sunday, 20 February 2011 17:39:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:04 UTC