mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
14 lines
305 B
JavaScript
14 lines
305 B
JavaScript
// Copyright 2020 the Deno authors. All rights reserved. MIT license.
|
|
|
|
const dataSmall = "";
|
|
const dataLarge = "x".repeat(10 * 1024);
|
|
|
|
onmessage = function (_e) {
|
|
for (let i = 0; i <= 10; i++) {
|
|
if (i % 2 == 0) {
|
|
postMessage(dataLarge);
|
|
} else {
|
|
postMessage(dataSmall);
|
|
}
|
|
}
|
|
};
|