pub fn new(url: &str) -> Result<WebSocket, CreationError> {
        js_try!(
            return new WebSocket(@{url});
        ).unwrap()
    }
/// Returns a newly constructed `WebSocket`.
///
/// [(JavaScript docs)](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
// https://html.spec.whatwg.org/#the-websocket-interface:dom-websocket
Returns a newly constructed `WebSocket`.
Returns a newly constructed ` WebSocket ` .
pub fn new(url: &str) -> Result<WebSocket, CreationError> {
        js_try!(
            return new WebSocket(@{url});
        ).unwrap()
    }
pub fn new ( url : & str ) -> Result < WebSocket , CreationError > { js_try ! ( return new WebSocket ( { url } ) ) . unwrap ( ) }
Returns a newly constructed `WebSocket`.
Returns a newly constructed ` WebSocket ` .
url
&str
url
&str