summaryrefslogtreecommitdiff
path: root/std/manual.md
diff options
context:
space:
mode:
Diffstat (limited to 'std/manual.md')
-rw-r--r--std/manual.md10
1 files changed, 4 insertions, 6 deletions
diff --git a/std/manual.md b/std/manual.md
index 03042c0fd..6da2d0ec2 100644
--- a/std/manual.md
+++ b/std/manual.md
@@ -937,12 +937,10 @@ Example:
import { serve } from "http/server.ts";
-window.onload = async function() {
- const body = new TextEncoder().encode("Hello World\n");
- for await (const req of serve(":8000")) {
- req.respond({ body });
- }
-};
+const body = new TextEncoder().encode("Hello World\n");
+for await (const req of serve(":8000")) {
+ req.respond({ body });
+}
```
```shell