Loop runs the context's event loop.
()
| 1267 | |
| 1268 | // Loop runs the context's event loop. |
| 1269 | func (ctx *Context) Loop() { |
| 1270 | if !ctx.hasValidRef() { |
| 1271 | return |
| 1272 | } |
| 1273 | ctx.ProcessJobs() |
| 1274 | C.js_std_loop(ctx.ref) |
| 1275 | ctx.ProcessJobs() |
| 1276 | } |
| 1277 | |
| 1278 | // LoopOnce runs one event-loop iteration and returns QuickJS libc status. |
| 1279 | func (ctx *Context) LoopOnce() int { |