dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.26k stars 1.58k forks source link

WebSocket.dart file is missing a factory #553

Closed DartBot closed 9 years ago

DartBot commented 12 years ago

This issue was originally filed by matthias.wesse...@kaazing.com


What steps will reproduce the problem?

  1. can't instantiate an object from the WebSocket class - A factory/constructor is missing that take the location (e.g. "ws://echo.websocket.org")

What is the expected output? What do you see instead? Expected => Being able to create a WebSocket object seeing => can't create such an object due to a lacking factory

What version of the product are you using? On what operating system? Tried it in the dart lang editor (Alpha). After not being able to create a WebSocket object, I looked at the source code of the WebSocket.dart file:

http://code.google.com/p/dart/source/browse/trunk/dart/client/html/src/WebSocket.dart

==> lack of factory

DartBot commented 12 years ago

This comment was originally written by drfibonacci@google.com


Added Area-UI, Triaged labels.

dgrove commented 12 years ago

Set owner to @vsmenon.

vsmenon commented 12 years ago

This is fixed for DartC and Frog. Pavel, can you investigate for Dartium? There is a failing test in expectations.


Set owner to podiv...@google.com.

DartBot commented 12 years ago

This comment was originally written by jordo...@gmail.com


I believe this only got fixed for dart:dom, because I'm still unable to construct a WebSocket using dart:html.

justinfagnani commented 12 years ago

It looks like not only is there no constructor that I can see for dart:html WebSocket, trying to create a dart:dom WebSocket throws a NotImplement exception in Dartium.

DartBot commented 12 years ago

This comment was originally written by podivilov@google.com


Added Fixed label.

justinfagnani commented 12 years ago

Where is this fixed? I don't see any factory or constructor for WebSocket in bleeding_edge and the latest editor build (4589) doesn't have a constructor.

DartBot commented 12 years ago

This comment was originally written by @financeCoding


It seems the fix was only for dart:dom. Can we get this for dart:html? Also trying to use WebSocket from dart:dom produced "Uncaught Error: INVALID_STATE_ERR: DOM Exception 11" on both Dartium and Chrome. I tried passing the --disable-web-security to both with the same error resulting. I'm on MacOSX if that makes a difference? My command for opening was "open Chromium.app --args --disable-web-security" .

DartBot commented 12 years ago

This comment was originally written by podivilov@google.com


I believe it works now in Dartium. Jacob, could you please fix dart:html?


Set owner to @jacob314. Added Triaged label.

jacob314 commented 12 years ago

Added Fixed label.