Skip to content
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

fix: fix MessageEvent. #1131

Merged
merged 1 commit into from Jan 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions kraken/lib/src/dom/event.dart
Expand Up @@ -377,7 +377,7 @@ class MediaError extends Event {
/// reference: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent
class MessageEvent extends Event {
/// The data sent by the message emitter.
final String data;
final dynamic data;

/// A USVString representing the origin of the message emitter.
final String origin;
Expand All @@ -387,7 +387,7 @@ class MessageEvent extends Event {
@override
Pointer<RawNativeMessageEvent> toRaw([int methodLength = 0]) {
List<int> methods = [
stringToNativeString(data).address,
stringToNativeString(jsonEncode(data)).address,
stringToNativeString(origin).address
];

Expand Down