Unify Web sockets event callback styles across dart:html and dart:io #3618
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
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.
The text was updated successfully, but these errors were encountered: