-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#53506Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: multi windowIssues related to multi window supportIssues related to multi window supportengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
The way we implement it today is we listen to beforeunload events and set the state to detached. This is wrong for 2 reasons:
- The
beforeunloadevent is cancelable, meaning it's possible for the page to continue to exist after this event fires (e.g. click on a link that downloads a file - issue). - The
detachedstate is about the app/engine having no views, and not about the page being unloaded.
To implement this properly, we need to watch the number of views registered in the engine. Once that number drops to zero, we switch to the detached state (and switch back to resumed when a view is registered).
ditman
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: multi windowIssues related to multi window supportIssues related to multi window supportengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team