Frontmatter imports are now valid YAML (`import:` / `导入:` with bind→target entries), removing spaced keys. Add `marqdo migrate imports`, hard-error the old one-liner form, and migrate lib/ext/examples/tests/docs accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
887 B
887 B
title, description, import
| title | description | import | ||
|---|---|---|---|---|
| browser fetch (C4) | fetch/after effects via lib/browser — no json glue |
|
main
wire =
| @ | 选择器 | 事件 | 调用 |
|---|---|---|---|
| 1 | "#load" | click | load |
| 2 | "#ping" | click | ping |
wire
load
msg = > browser.set_text sel="#status" text="loading…"
req = > browser.fetch url="https://httpbin.org/uuid" then="on_uuid"
> browser.merge a=msg b=req
on_uuid
+ `ok`
+ `status`
+ `body`=""
+ `error`=""
- ok > browser.set_text sel="#status" text=body
-
ping
msg = > browser.set_text sel="#status" text="wait 600ms…"
t = > browser.after ms=600 then="on_ping"
> browser.merge a=msg b=t
on_ping
+ `ok`=True
> browser.set_text sel="#status" text="pong"