Skip to content

Conversation

@kinyoklion
Copy link
Member

No description provided.

http_parser: ^4.0.0
uuid: ">= 3.0.7 <5.0.0"
crypto: ^3.0.3
web: ^1.1.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaces dart:html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was regenerated.

final messageEvent = event as web.MessageEvent;
final ldMessageEvent = ld_message_event.MessageEvent(
messageEvent.type, messageEvent.data, messageEvent.lastEventId);
messageEvent.type, (messageEvent.data as JSString).toDart, messageEvent.lastEventId);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cast should be done safer.

final ldMessageEvent = ld_message_event.MessageEvent(messageEvent.type,
(messageEvent.data as JSString).toDart, messageEvent.lastEventId);
_messageEventsController.sink.add(ldMessageEvent);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kinyoklion This is my attempt to make this cast safer. ld_message_event.MessageEvent will not accept null for the data parameter so my thought is that if we can't cast it then we just skip handling the message. Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds reasonable.

@kinyoklion kinyoklion closed this Apr 21, 2025
@kinyoklion kinyoklion deleted the rlamb/support-wasm branch April 21, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants