browser
The page a browser build runs in; off the web every query answers nil. A parent-frame message is the browser_event event: events::listen(node…
On this page
The page a browser build runs in; off the web every query answers nil. A parent-frame message is the browser_event event: events::listen(node, "browser_event"), heard as on_browser_event(payload).
5 functions, 0 constants. Scripts reach it as browser::.
Functions
Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.
| function | acts on | what it does |
|---|---|---|
hardware_concurrency() -> int? |
— | How many threads the browser reports, or nil off the web. |
location() -> str? |
— | The page's URL, or nil off the web. |
post_message(any) -> bool |
— | Post a value to the page that embeds this one. False off the web, and false while a recording plays. |
user_agent() -> str? |
— | The browser's user agent string, or nil off the web. |
visible() -> bool |
— | Whether the tab is in front of the player; true off the web. |