@@ -2553,11 +2553,21 @@ <h3>
2553
2553
Web Apps with scope conflicts
2554
2554
</ h3 >
2555
2555
< p >
2556
- Because scopes are based on URL matching, it is possible for a
2557
- developer to create multiple web applications with the same,
2558
- overlapping, or nested scopes. Doing so creates several issues
2559
- (detailed below) and is thus considered bad practice.
2556
+ Because scopes are based on URL matching, it is possible for a developer to create
2557
+ multiple web applications with the same, overlapping, or nested scopes. Doing so creates
2558
+ several issues (detailed below) and is thus considered bad practice.
2560
2559
</ p >
2560
+ < ul >
2561
+ < li > The scopes of the two web apps can be on the same origin. Not
2562
+ recommended.
2563
+ </ li >
2564
+ < li > The scope of one web app can be nested inside the scope of the
2565
+ other. Strongly not recommended.
2566
+ </ li >
2567
+ < li > The scopes of the two web apps can be the same. Strongly not
2568
+ recommended.
2569
+ </ li >
2570
+ </ ul >
2561
2571
< p >
2562
2572
Same-origin scopes are not recommended due to origin-based settings
2563
2573
that will affect all apps installed under that origin. Settings like:
@@ -2567,49 +2577,28 @@ <h3>
2567
2577
</ li >
2568
2578
< li > Storage and storage quota
2569
2579
</ li >
2570
- < li > User settings (e.g. font size, zoom level )
2580
+ < li > User settings (e.g. font size)
2571
2581
</ li >
2572
2582
</ ul >
2573
2583
< p >
2574
- To aide with disambiguation apps with scope conflicts, user agents
2575
- can determine the < dfn > controlling app</ dfn > for a given document
2576
- URL, which is an [=installed web application=] with the longest
2577
- [=manifest/scope=] where the document url is [=manifest/within
2578
- scope=] of that application. If multiple apps fit this description
2579
- (in the case of matching scopes), then the user agent may choose
2580
- none, one, or all, depending on the scenario.
2581
- </ p >
2582
- < p >
2583
- The following scenarios may require the user agent choosing a
2584
- [=controlling app=], not work, or be unpredictable with nested or
2585
- matching scopes:
2584
+ Further, overlapping, nested, or duplicate scopes can have the following UX and
2585
+ API problems or inconsistencies among other possible consistencies:
2586
2586
</ p >
2587
2587
< ul >
2588
- < li > Installation prompting.
2588
+ < li > Installation prompting may not work for the nested app if the
2589
+ outer app is installed.
2589
2590
</ li >
2590
- < li > User-agent UX around launching an app for a browsing context.
2591
+ < li > User-agent UX around launching an app for a browsing context may
2592
+ be inconsistent or not appear.
2591
2593
</ li >
2592
- < li > Notifications and notification attribution.
2594
+ < li > Badging API calls will not be able to consistently update the
2595
+ correct web app badge.
2593
2596
</ li >
2594
- < li > And current or future APIs that somehow correspond to a single web app identity
2595
- (e.g. badging).
2597
+ < li > Notifications may have incorrect attribution or not appear.
2598
+ </ li >
2599
+ < li > Future APIs may not work at all in this configuration.
2596
2600
</ li >
2597
2601
</ ul >
2598
- < aside class ="example ">
2599
- < p >
2600
- If a user agent supports the notifications API and there are two
2601
- apps installed with matching scopes, which app should be seen as
2602
- the author of that notification if it comes from within the scope
2603
- of both?
2604
- </ p >
2605
- < p >
2606
- If two apps are nested and a notification is triggered within scope
2607
- of both, the notification will likely be attributed to the
2608
- [=controlling app=]. But what if the nested app is not installed,
2609
- and the outer app is? Is the developer expecting the notification
2610
- to be attributed to the outer app?
2611
- </ p >
2612
- </ aside >
2613
2602
</ section >
2614
2603
</ section >
2615
2604
< section >
0 commit comments