WICG / web-app-launch

Web App Launch Handler
Other
74 stars 31 forks source link

Consolidate the launch_handler API with MiniApps #52

Closed alancutter closed 1 year ago

alancutter commented 2 years ago

Extracted from TAG review: https://github.com/w3ctag/design-reviews/issues/683#issuecomment-1048422406 @maxpassion, @QingAn

MiniApps define their own application lifecycle: https://w3c.github.io/miniapp-lifecycle/#miniapp-global-application-lifecycle We should attempt to be compatible with the MiniApp model and any APIs they've already established.

alancutter commented 2 years ago

I don't quite understand https://w3c.github.io/miniapp-lifecycle/#dom-globallaunchedcallback which appears relatively similar to LaunchQueue.

When is this set and how does that happen prior to the MiniApp getting launched?

Do MiniApps have multiple ways of being launched that ought to be intercepted by already running instances e.g. share targets or link captures? Is globalLaunchedCallback the way to intercept them?

alancutter commented 2 years ago

@QingAn do mini apps have the concept of being open multiple times in separate windows/tabs? Do they exist on desktop environments?

tomayac commented 2 years ago

Mini apps on desktop are very much a thing. As far as my experiments go, there can always only be one instance of a mini app at any given time.

alancutter commented 2 years ago

Fantastic article, thank you!

alancutter commented 2 years ago

Do mini apps even have their own window or do they live purely in the context of the super app? I suppose it's possible for super apps to behave like browsers and have separate windows/tabs for each mini app if they wanted to...

tomayac commented 2 years ago

Mini apps launch in stand-alone windows. Here's an example from a WeChat mini app on desktop:

Screen Shot 2022-04-21 at 09 27 01

The 360 Browser is both a regular browser and a mini app host. Mini apps launched from the browser have access to non-Web APIs, and launch in separate windows.

alancutter commented 1 year ago

Given that MiniApps can only run one window at a time I believe launch_handler will pretty much be ignored by the user agent just like on mobile where the window semantics are similar.