Skip to content

Commit c7432bf

Browse files
askeksaCommit Queue
authored andcommitted
[dart2wasm] Workarounds to compile and run flute
Change-Id: I9180a2a65d47b11ec5e13d9c003c10b428bc15fc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287540 Commit-Queue: Aske Simon Christensen <[email protected]> Reviewed-by: Joshua Litt <[email protected]>
1 parent 3f0c013 commit c7432bf

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/dart2wasm/bin/run_wasm.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ const main = async () => {
4242
return new WebAssembly.Instance(compile(filename), imports);
4343
}
4444

45+
globalThis.window ??= globalThis;
46+
4547
let importObject = {};
4648

4749
// Is an FFI module specified?

pkg/dart2wasm/lib/target.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class WasmTarget extends Target {
6969
'dart:nativewrappers',
7070
'dart:io',
7171
'dart:js_interop',
72+
'dart:js',
7273
'dart:js_util',
7374
'dart:wasm',
7475
'dart:developer',

0 commit comments

Comments
 (0)