Expand description
Which new windows a browser pane’s page may open inside AgentMux (docs/specs/SPEC_BROWSER_PANE_POPUPS_ADOPTED_2026_10_08.md §3.1, docs/specs/SPEC_BROWSER_PANE_NATIVE_POPUPS_AGENT_DRIVEN_2026_10_08.md §3).
Shared by the CEF host, which must decide inside on_before_popup
(creating a native popup is that callback’s return value, so it can’t
wait on srv), and srv, which re-checks before it opens a pane.
Enums§
- Refusal
- Why a request is not honored. The caller does what it did before this existed (the system browser, or the pane’s own frame for a link).
Constants§
- MAX_
POPUPS_ PER_ PANE - New windows one pane may have open at once, per kind (popup windows, popup panes). Beyond it, they go to the system browser.
Functions§
- decide
- Is this request honored?
- is_
loopback - Is
urlon this machine’s loopback (localhost,127.0.0.1,[::1])? - loopback_
allowed - May a page on loopback open a window to
url, also on loopback? Only on its own origin (a local dev site opening its own popup), and never one of AgentMux’s own (own_origins: its frontend and srv), which a page must not be able to put in front of the person (native-popups spec §3). - origin_
of url’s origin (scheme://host[:port]), or empty if it isn’t http(s).- popup_
window_ title - The title for a popup window, which has no address bar: where it is,
then the page’s own title, e.g.
accounts.google.com — Sign in(native-popups spec §8.4, N2). A page can set its title to anything, so the part it can’t set comes first.Nonefor an address with nothing to show (devtools:and the like): leave the title as the page set it. - same_
site - Do both URLs belong to the same site: the same registrable domain under
the public suffix list (
console.example.comandsignin.example.comdo;a.github.ioandb.github.iodon’t)? A host with no registrable domain (an IP address,localhost) matches only itself.