Skip to content

Commit 4664887

Browse files
authored
Merge pull request #97 from dab246/fix-broadcast-channel-not-found-when-compile-on-mobile
fix: BroadcastChannel method not found when run on `dart.library.io`
2 parents 3a50834 + c8ce1cc commit 4664887

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

lib/src/html.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ part 'html/api/window.dart';
121121
part 'html/api/window_misc.dart';
122122

123123
part 'html/api/workers.dart';
124-
124+
part 'html/api/broadcast_channel.dart';
125125
part 'html/dom/css.dart';
126126

127127
part 'html/dom/css_computed_style.dart';
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
part of '../../html.dart';
2+
3+
class BroadcastChannel {
4+
final String name;
5+
6+
BroadcastChannel(this.name);
7+
8+
void close() {}
9+
10+
void postMessage(Object message) {}
11+
12+
Stream<dynamic> get onMessage => const Stream.empty();
13+
}

0 commit comments

Comments
 (0)