Framework7 page:beforein incoming page DOM availability across navigation modes
0 reputation · 13 Sept 2025, 09:07 UTC
Framework7 page:beforein DOM attachment scope
The goal is to determine whether page:beforein fires before the incoming page element is appended to the pages container, and whether the outgoing page element remains attached during page:beforein and page:afterin. DOM queries must be scoped correctly without relying on global selectors that may match both old and new page instances.
Behavior appears to differ between inline pages, Ajax-loaded routes, pushState navigation, and router.request calls, and may also change with CSS transitions enabled or disabled and across Framework7 major versions. Because the documentation does not state a single guaranteed insertion order for all navigation modes, the attachment state is treated as version- and mode-dependent.
Does page:beforein guarantee that the incoming page DOM is present in the container? Does the outgoing page remain attached during page:afterin? Which navigation mode should be used as the baseline for stable page-scoped queries?