mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 17:57:36 +08:00
Breaking changes here https://github.com/mochajs/mocha/releases/tag/v8.0.0 seem fine. DISABLE_THIRD_PARTY_CHECK=Update Mocha Bug: chromium:1101784 Change-Id: Idc75c94f9a923e2b0ca13d1d1331540cb1c5d3a3 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2279830 Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
30 lines
612 B
HTML
30 lines
612 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Worker pool in the browser</title>
|
|
|
|
<script src="../../dist/workerpool.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<script>
|
|
// create a worker pool
|
|
var pool = workerpool.pool('../workers/browserWorker.js');
|
|
|
|
// create a proxy
|
|
pool.proxy()
|
|
.then(function (proxy) {
|
|
// execute a function via the proxy
|
|
return proxy.fibonacci(10);
|
|
})
|
|
.then(function (result) {
|
|
document.write('Result: ' + result + '<br>'); // outputs 55
|
|
})
|
|
.catch(function (err) {
|
|
document.write('Result: ' + err);
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html> |