Skip to content

Unify Web sockets event callback styles across dart:html and dart:io #3618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sethladd opened this issue Jun 13, 2012 · 2 comments
Closed

Unify Web sockets event callback styles across dart:html and dart:io #3618

sethladd opened this issue Jun 13, 2012 · 2 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-io

Comments

@sethladd
Copy link
Contributor

Web sockets in dart:html:

  ws.on.open.add((e) {
    print("connected"):
  });

  ws.on.message.add((e) {
    print('received message ${e.data}');
  });

Web sockets in dart:io:

webSocketHandler.onOpen = (connection) {
  connection.onOpen = (message) {
    print(message);
  };
}

This difference leads to developer confusion. Why the difference? Should I emulate one or the other?

Let's unify the way callbacks are registered and handled across web sockets for HTML and IO. This is a specialization of the broader effort to create more unified looking libraries.

@sethladd
Copy link
Contributor Author

Added Duplicate label.
Marked as being merged into #2958.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO, Area-DOM labels.
Added Area-Library, Library-IO labels.

@sethladd sethladd added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io closed-duplicate Closed in favor of an existing report labels May 14, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-duplicate Closed in favor of an existing report library-io
Projects
None yet
Development

No branches or pull requests

2 participants