Commit
•
a5a6e17
1
Parent(s):
03ec9d2
Update clash-client.js
Browse files- clash-client.js +5 -0
clash-client.js
CHANGED
@@ -1637,6 +1637,7 @@ async function run({selector, control}) {
|
|
1637 |
const url = src.replace("client.js", "client.wasm");
|
1638 |
console.log("Loading wasm from", url);
|
1639 |
await load(url);
|
|
|
1640 |
});
|
1641 |
}
|
1642 |
|
@@ -1645,11 +1646,15 @@ async function run({selector, control}) {
|
|
1645 |
|
1646 |
window.clash = {
|
1647 |
launch(selector) {
|
|
|
1648 |
const control = new Control();
|
|
|
1649 |
window.clash_control = control;
|
1650 |
|
1651 |
run({selector, control});
|
1652 |
|
|
|
|
|
1653 |
return control;
|
1654 |
},
|
1655 |
};
|
|
|
1637 |
const url = src.replace("client.js", "client.wasm");
|
1638 |
console.log("Loading wasm from", url);
|
1639 |
await load(url);
|
1640 |
+
console.log("loaded wasm");
|
1641 |
});
|
1642 |
}
|
1643 |
|
|
|
1646 |
|
1647 |
window.clash = {
|
1648 |
launch(selector) {
|
1649 |
+
console.log("launch called");
|
1650 |
const control = new Control();
|
1651 |
+
console.log("control created");
|
1652 |
window.clash_control = control;
|
1653 |
|
1654 |
run({selector, control});
|
1655 |
|
1656 |
+
console.log("run called");
|
1657 |
+
|
1658 |
return control;
|
1659 |
},
|
1660 |
};
|