From df0298517e01e07be9c9b4eb7c44dcf603c051c3 Mon Sep 17 00:00:00 2001
From: Matt Giuca
This member is intended to be only used for advanced cases, where the
developer wants explicit control over the fallback order of their
- display modes. Otherwise, the [=manifest/display=] member is sufficient
- for most use cases.
+ display modes, or for modes that are not available in the basic
+ display modes
+ list. Otherwise, the [=manifest/display=] member is sufficient for
+ most use cases.
+ The `tab_strip` member of the Web Application Manifest is
+ an object that contains
+ information about how the application is intended to behave in the
+ [=display mode/tabbed=] display mode. It has the following members:
+
+ The home_tab member of the tab_strip object is an ordered map that
+ contains information about a specially marked application context
+ that, if it exists, is in every app window. This application context
+ has special properties compared to other application contexts, such
+ as restricted navigation and it SHOULD have a different appearance.
+
+ A home tab context is the application context in which these special
+ properties are applied.
+
+ If the home_tab member is not present, then the application is not
+ intended to have a home tab context, otherwise it is an ordered map
+ with the following members:
+
+ How the home tab context is presented is at the discretion of the
+ user agent.
+
+ The home tab scope is the set of URLs to which the home tab context
+ can be navigated to. All navigations within the application to a URL
+ within the home tab scope will be done in the home tab context, and
+ all other navigations will be done in a different application
+ context.
+
+ The home tab scope consists of the start_url and URLs that match a
+ pattern specified in the scope_patterns field.
+
+ The home tab scope_patterns member is a list of URLPatterns that
+ define the scope of the home tab.
+
+ If navigating from the home tab context to a URL url that is
+ outside of the home tab scope the following steps are run:
+
+ If navigating to a URL url within the home tab scope, the following
+ steps are run:
+
+ The tab_strip new_tab_button member is an ordered map that describes
+ the behaviour of a UI affordance (such as a button) which, when
+ clicked/activated, opens a new application context within the
+ application window. It has the following members:
+
+ If url is within the home tab scope, then the new tab button may be
+ hidden.
+
+ The new_tab_button’s url member is a string that represents a URL
+ relative to the manifest URL that is within scope of a processed
+ manifest. This URL will be navigated to when the new tab button is
+ activated.
+
- The home_tab member of the tab_strip object is an ordered map that
- contains information about a specially marked application context
- that, if it exists, is in every app window. This application context
- has special properties compared to other application contexts, such
- as restricted navigation and it SHOULD have a different appearance.
+ The `home_tab` member of the [=tab_strip=] object is an ordered map
+ that contains information about a specially marked [=application
+ context=] that, if it exists, is in every app window. This
+ application context has special properties compared to other
+ application contexts, such as restricted navigation and it SHOULD
+ have a different appearance.
- A home tab context is the application context in which these special
- properties are applied.
+ A home tab context is the [=application context=] in which
+ these special properties are applied.
- If the home_tab member is not present, then the application is not
- intended to have a home tab context, otherwise it is an ordered map
- with the following members:
+ If the [=tab_strip/home_tab=] member is not present, then the
+ application is not intended to have a home tab context, otherwise it
+ is an ordered map with the following members:
- How the home tab context is presented is at the discretion of the
+ How the [=home tab context=] is presented is at the discretion of the
user agent.
- The home tab scope is the set of URLs to which the home tab context
- can be navigated to. All navigations within the application to a URL
- within the home tab scope will be done in the home tab context, and
- all other navigations will be done in a different application
- context.
+ The home tab scope is the set of URLs to which the home
+ tab context can be navigated to. All navigations within the
+ application to a URL within the home tab scope will be done in the
+ [=home tab context=], and all other navigations will be done in a
+ different [=application context=].
- The home tab scope consists of the start_url and URLs that match a
- pattern specified in the scope_patterns field.
+ The [=home tab scope=] consists of the [=start URL=] and URLs that
+ match a pattern specified in the [=scope_patterns=] field.
- The home tab scope_patterns member is a list of URLPatterns that
- define the scope of the home tab.
+ The [=home_tab/scope_patterns=] member is a list of [=URLPattern=]s
+ that define the scope of the home tab.
- If navigating from the home tab context to a URL url that is
- outside of the home tab scope the following steps are run:
+ If navigating from the home tab context to a [=URL=] |URL:url| that
+ is outside of the [=home tab scope=], the following steps are run:
- If navigating to a URL url within the home tab scope, the following
- steps are run:
+ If navigating to a [=URL=] |URL:url| within the [=home tab scope=],
+ the following steps are run:
- The tab_strip new_tab_button member is an ordered map that describes
- the behaviour of a UI affordance (such as a button) which, when
- clicked/activated, opens a new application context within the
- application window. It has the following members:
+ The [=tab_strip/new_tab_button=] member is an ordered map that
+ describes the behaviour of a UI affordance (such as a button) which,
+ when clicked/activated, opens a new [=application context=] within
+ the application window. It has the following members:
- If url is within the home tab scope, then the new tab button may be
- hidden.
+ If [=new_tab_button/url=] is within the [=home tab scope=], then the
+ new tab button may be hidden.
- The new_tab_button’s url member is a string that represents a URL
- relative to the manifest URL that is within scope of a processed
- manifest. This URL will be navigated to when the new tab button is
- activated.
+ The [=url=] member is a string that represents a URL relative to
+ the [=manifest URL=] that is [=within scope=] of a [=processed
+ manifest=]. This URL will be navigated to when the new tab button
+ is activated.
- The [=home_tab/scope_patterns=] member is a list of [=URLPattern=]s
- that define the scope of the home tab.
+ The [=home_tab/scope_patterns=] member is a list of [=URL
+ pattern=]s that define the scope of the home tab.
If navigating from the home tab context to a [=URL=] |URL:url| that
@@ -353,10 +354,14 @@
The [=url=] member is a string that represents a URL relative to
- the [=manifest URL=] that is [=within scope=] of a [=processed
- manifest=]. This URL will be navigated to when the new tab button
- is activated.
+ the [=manifest URL=] that is [=manifest/within scope=] of a
+ [=Document/processed manifest=]. This URL will be navigated to when
+ the new tab button is activated.
mode/window-controls-overlay=] and the user agent supports this,
then return that |candidate_display_mode:DisplayModeType|.
+
From a72aa406717be0161f6bc33a28023568d7ea6a25 Mon Sep 17 00:00:00 2001
From: Matt Giuca
@@ -224,6 +233,24 @@
+
+ tab_strip
member
+
+
+
`share_target` member
From b8a1e95b43810c5cdf3e0f691fe10d9fb56fb9b8 Mon Sep 17 00:00:00 2001
From: Matt Giuca
+ home_tab member
+
+
+
+
+ scope_patterns member
+
+
+
+
+
+
+ new_tab_button member
+
+
+
+
+ url member
+
+
+ Processing tab_strip member
+
To process the tab_strip member, given ordered map json, ordered
+ map manifest, URL manifest_URL, run the following during the extension
+ point in processing a manifest:
+
+
+
+ Processing home_tab member
+
To process the home_tab member, given ordered map json, ordered
+ map manifest_tab_strip, URL manifest_URL, run the following:
+
+
+
+ Processing the new_tab_button member
+
To process the new_tab_button member, given ordered map json,
+ ordered map manifest_tab_strip, URL manifest_URL, run the following:
+
+
+
+ Processing the scope_patterns member
+
To process the scope_patterns member, given ordered map json,
+ ordered map manifest_home_tab, run the following:
+
+
+
+
+
From 2defed98c344556d87a41cbf4a829c50871fd46a Mon Sep 17 00:00:00 2001
From: Matt Giuca
- home_tab member
+
home_tab
member
- scope_patterns member
+
scope_patterns
member
-
-
- new_tab_button member
+
new_tab_button
member
- url member
+
url
member
- Processing tab_strip member
-
To process the tab_strip member, given ordered map json, ordered
- map manifest, URL manifest_URL, run the following during the extension
- point in processing a manifest:
+ Processing the `tab_strip` member
+ To process the `tab_strip` member, given [=ordered
+ map=] |json:ordered map|, [=ordered map=] |manifest:ordered map|, and
+ [=URL=] |manifest URL:URL|, run the following during the extension
+ point in [=processing a manifest=]:
-
- Processing home_tab member
-
To process the home_tab member, given ordered map json, ordered
- map manifest_tab_strip, URL manifest_URL, run the following:
+ Processing the `home_tab` member
+ To process the `home_tab` member, given [=ordered map=]
+ |json:ordered map|, [=ordered map=] |manifest tab strip:ordered map|,
+ and [=URL=] |manifest URL:URL|, run the following:
-
- Processing the new_tab_button member
-
To process the new_tab_button member, given ordered map json,
- ordered map manifest_tab_strip, URL manifest_URL, run the following:
+ Processing the `new_tab_button` member
+ To process the `new_tab_button` member, given [=ordered
+ map=] |json:ordered map|, [=ordered map=] |manifest tab strip:ordered
+ map|, [=URL=] |manifest URL:URL|, and [=URL=] |start URL:URL|, run the
+ following:
-
- Processing the scope_patterns member
-
To process the scope_patterns member, given ordered map json,
- ordered map manifest_home_tab, run the following:
+ Processing the `scope_patterns` member
+ To process the `scope_patterns` member, given [=ordered
+ map=] |json:ordered map|, [=ordered map=] |manifest home tab:ordered
+ map|, run the following:
-
-
scope_patterns
member
"manifest URL" and "start URL" need to be exported from APPMANIFEST. See w3c/manifest#1112. -
home_tab
member
@@ -465,20 +465,15 @@ + The "search component" and "hash component" of URL pattern are not + exported. It isn't clear to me how we would go about setting them to + undefined if they are private (you can't just set them to undefined + in the input dictionary, because the `baseURL` can be used to set + them). It's also not clear to me why we want to set them to undefined. -
url
member
+ "url" is already defined as a member of another struct. This is + causing linking issues. +
The [=url=] member is a string that represents a URL relative to
the [=manifest URL=] that is [=manifest/within scope=] of a
From 8929fd3297a98f426cdaba97aa2643405f487ddd Mon Sep 17 00:00:00 2001
From: Matt Giuca
tabbed
The `home_tab` member of the [=tab_strip=] object is an ordered map
that contains information about a specially marked [=application
context=] that, if it exists, is in every app window. This
- application context has special properties compared to other
+ [=application context=] has special properties compared to other
application contexts, such as restricted navigation and it SHOULD
have a different appearance.
If the [=tab_strip/home_tab=] member is not present, then the - application is not intended to have a home tab context, otherwise it - is an ordered map with the following members: + application is not intended to have a [=home tab context=], otherwise + it is an ordered map with the following members:
The home tab scope is the set of URLs to which the home tab context can be navigated to. All navigations within the - application to a URL within the home tab scope will be done in the - [=home tab context=], and all other navigations will be done in a + application to a URL within the [=home tab scope=] will be done in + the [=home tab context=], and all other navigations will be done in a different [=application context=].
@@ -314,8 +314,9 @@
- If navigating from the home tab context to a [=URL=] |URL:url| that - is outside of the [=home tab scope=], the following steps are run: + If navigating from the [=home tab context=] to a [=URL=] |URL:url| + that is outside of the [=home tab scope=], the following steps are + run:
If [=new_tab_button/url=] is within the [=home tab scope=], then the - new tab button may be hidden. + user agent MUST hide the new tab button. +
++ This should probably be stronger: check if it matches in the parser + and ignore it. Add a note here.
- The "search component" and "hash component" of URL pattern are not - exported. It isn't clear to me how we would go about setting them to - undefined if they are private (you can't just set them to undefined - in the input dictionary, because the `baseURL` can be used to set - them). It's also not clear to me why we want to set them to - undefined. -
++ To process the `home_tab` member, given [=ordered map=] + |json:ordered map|, [=ordered map=] |manifest tab strip:ordered + map|, and [=URL=] |manifest URL:URL|, run the following: +
++ To process the `new_tab_button` member, given [=ordered + map=] |json:ordered map|, [=ordered map=] |manifest tab + strip:ordered map|, [=URL=] |manifest URL:URL|, and [=URL=] |start + URL:URL|, run the following: +
++ To process the `scope_patterns` member, given [=ordered + map=] |json:ordered map|, [=ordered map=] |manifest home + tab:ordered map| and [=URL=] |manifest URL:URL|, run the following: +
++ The "search component" and "hash component" of URL pattern are not + exported. It isn't clear to me how we would go about setting them + to undefined if they are private (you can't just set them to + undefined in the input dictionary, because the `baseURL` can be + used to set them). It's also not clear to me why we want to set + them to undefined. +
+The `home_tab` member of the [=tab_strip=] object is an ordered map - that contains information about a specially marked [=application - context=] that, if it exists, is in every app window. This - [=application context=] has special properties compared to other - application contexts, such as restricted navigation and it SHOULD - have a different appearance. + that contains information about a special "home tab" that is intended + to serve as the top-level menu for the application. It contains the + following members:
+
- A home tab context is the [=application context=] in which
- these special properties are applied.
+ The scope_patterns
member is a list of
+ {{URLPatternInput}}s that define the [=home tab scope|scope of the
+ home tab=] relative to the [=manifest URL=].
*
" as a wildcard character, or a dictionary containing
+ separate URL components with "*
" wildcards. See
+ [[urlpattern]] for more information.
- If the [=tab_strip/home_tab=] member is not present, then the - application is not intended to have a [=home tab context=], otherwise - it is an ordered map with the following members: + If the [=home_tab=] member is validly specified, every application + window SHOULD feature an [=application context=] called the home + tab context that has special properties compared to other + application contexts. If [=home_tab=] is not present or not valid, + then the application windows SHOULD NOT have a [=home tab context=].
-How the [=home tab context=] is presented is at the discretion of the - user agent. + user agent, but it SHOULD have a different appearance to normal tabs.
- The home tab scope is the set of URLs to which the home - tab context can be navigated to. All navigations within the - application to a URL within the [=home tab scope=] will be done in - the [=home tab context=], and all other navigations will be done in a - different [=application context=]. + The home tab scope is a set of [=URLs=] which comprises + the union of the [=start URL=] and all URLs |url:URL| to which + applying [=URL pattern/match=] given any element of the + [=scope_patterns=] field and |url| returns a {{URLPatternResult}}.
- The [=home tab scope=] consists of the [=start URL=] and URLs that - match a pattern specified in the [=scope_patterns=] field. + A URL is said to be within home tab scope if it is a + member of the [=home tab scope=]. It is outside of home tab + scope if it is not a member of [=home tab scope=]. +
++ Be more clear that [=home tab scope=] is not defined when `home_tab` + is not given (as opposed to the above, which implies that it defaults + to [=start URL=]).
+ When a [=home tab scope=] is defined, the user agent SHOULD ensure + that at all times: +
++ The rule about "[=initial URL=] is [=within home tab scope=]" is + based on the understanding that "initial URL" refers to the current + URL of the document (not simply the URL initially loaded into the + application context). The "initial" simply refers to not taking into + account changes made to the display URL via the History API. Verify + this and possibly add a note. Also, this is not linkable. Find a way + to reference this aspect of the context (possibly via document). +
++ In order to ensure the above rule that "every application window has + exactly one [=home tab context=]", the user agent will need to create + a new [=home tab context=] whenever a new application window is + created, for example when launching the application, or when moving a + tab to a new window. A newly created [=home tab context=] SHOULD be + navigated to the [=start URL=], which by definition is [=within home + tab scope=]. +
scope_patterns
member
- - The [=home_tab/scope_patterns=] member is a list of [=URL - pattern=]s that define the scope of the home tab. -
+- If navigating from the [=home tab context=] to a [=URL=] |URL:url| - that is outside of the [=home tab scope=], the following steps are - run: + If navigating from the [=home tab context=] to a [=URL=] |url:URL| + that is [=outside of home tab scope=], the following steps are run:
- If navigating to a [=URL=] |URL:url| within the [=home tab scope=], - the following steps are run: + If navigating to a [=URL=] |url:URL| [=within home tab scope=], the + following steps are run:
+ "url" is already defined as a member of another struct. This is + causing linking issues. +
++ The [=url=] member is a string that represents a URL relative to the + [=manifest URL=] that is [=manifest/within scope=] of a + [=Document/processed manifest=]. +
++ When the new tab button is activated by the end user, the following + steps are run: +
+- If [=new_tab_button/url=] is within the [=home tab scope=], then the - user agent MUST hide the new tab button. + If [=new_tab_button/url=] is [=within home tab scope=], then the user + agent MUST hide the new tab button.
This should probably be stronger: check if it matches in the parser and ignore it. Add a note here.
-url
member
- - "url" is already defined as a member of another struct. This is - causing linking issues. -
-- The [=url=] member is a string that represents a URL relative to - the [=manifest URL=] that is [=manifest/within scope=] of a - [=Document/processed manifest=]. This URL will be navigated to when - the new tab button is activated. -
-+ To process the `tab_strip` member, given [=ordered map=] + |json:ordered map|, [=ordered map=] |manifest:ordered map|, and + [=URL=] |manifest URL:URL|, run the following during the + + extension point in [=processing a manifest=]: +
- If the [=home_tab=] member is validly specified, every application - window SHOULD feature an [=application context=] called the home - tab context that has special properties compared to other - application contexts. If [=home_tab=] is not present or not valid, - then the application windows SHOULD NOT have a [=home tab context=]. + The home tab context is an optional [=application + context=] that has special properties compared to other application + contexts. If the [=home_tab=] member is validly specified, every + application window SHOULD feature a [=home tab context=]. If + [=home_tab=] is not present or not valid, then the application + windows SHOULD NOT have a [=home tab context=].
How the [=home tab context=] is presented is at the discretion of the user agent, but it SHOULD have a different appearance to normal tabs.
- The home tab scope is a set of [=URLs=] which comprises - the union of the [=start URL=] and all URLs |url:URL| to which - applying [=URL pattern/match=] given any element of the - [=scope_patterns=] field and |url| returns a {{URLPatternResult}}. + The home tab scope is a set of [=URLs=] which, if + [=home_tab=] is validly specified, comprises the union of the [=start + URL=] and all URLs |url:URL| to which applying [=URL pattern/match=] + given any element of the [=scope_patterns=] field and |url| returns a + {{URLPatternResult}}. If [=home_tab=] is not present or not valid, + then the [=home tab scope=] is the empty set.
A URL is said to be within home tab scope if it is a member of the [=home tab scope=]. It is outside of home tab scope if it is not a member of [=home tab scope=].
-- Be more clear that [=home tab scope=] is not defined when `home_tab` - is not given (as opposed to the above, which implies that it defaults - to [=start URL=]). -
- The "search component" and "hash component" of URL pattern are not - exported. It isn't clear to me how we would go about setting them - to undefined if they are private (you can't just set them to - undefined in the input dictionary, because the `baseURL` can be - used to set them). It's also not clear to me why we want to set - them to undefined. -
*
" wildcards. See
[[urlpattern]] for more information.
+ + An application has a home tab if the [=processed + manifest=] includes a non-null [=home_tab=] member of the + [=tab_strip=] member. +
The home tab context is an optional [=application context=] that has special properties compared to other application - contexts. If the [=home_tab=] member is validly specified, every - application window SHOULD feature a [=home tab context=]. If - [=home_tab=] is not present or not valid, then the application - windows SHOULD NOT have a [=home tab context=]. + contexts. If the application [=has a home tab=], every application + window SHOULD feature a [=home tab context=]. If not, then the + application windows SHOULD NOT have a [=home tab context=].
How the [=home tab context=] is presented is at the discretion of the user agent, but it SHOULD have a different appearance to normal tabs.
- The home tab scope is a set of [=URLs=] which, if - [=home_tab=] is validly specified, comprises the union of the [=start + The home tab scope is a set of [=URLs=] which, if the + application [=has a home tab=], comprises the union of the [=start URL=] and all URLs |url:URL| to which applying [=URL pattern/match=] - given any element of the [=scope_patterns=] field and |url| returns a - {{URLPatternResult}}. If [=home_tab=] is not present or not valid, - then the [=home tab scope=] is the empty set. + given any element of the [=scope_patterns=] member of the + [=home_tab=] member of the [=tab_strip=] member of the [=processed + manifest=] and |url| returns a {{URLPatternResult}}. If the + application does not [=has a home tab|have a home tab=], then the + [=home tab scope=] is the empty set.
A URL is said to be within home tab scope if it is a
From 80ef095b450ccad7282063f7f1b789a21be73e9b Mon Sep 17 00:00:00 2001
From: Matt Giuca
+
[=manifest URL=] that is [=manifest/within scope=] of a
[=Document/processed manifest=].
When the new tab button is activated by the end user, the following steps are run: @@ -426,19 +430,6 @@
- If [=new_tab_button/url=] is [=within home tab scope=], then the user - agent MUST hide the new tab button. -
-- This should probably be stronger: check if it matches in the parser - and ignore it. Add a note here. -
The rule about "[=initial URL=] is [=within home tab scope=]" is
based on the understanding that "initial URL" refers to the current
From 268d2cfcfc04310af53b909636eae9a7598b290a Mon Sep 17 00:00:00 2001
From: Matt Giuca
- When a [=home tab scope=] is defined, the user agent SHOULD ensure
+ When an application [=has a home tab=], the user agent SHOULD ensure
that at all times:
the [=home tab scope=].
From 3df45bcb48f6ad97c64cd8ebe631ff3bfe4f074e Mon Sep 17 00:00:00 2001
From: Matt Giuca
+ { + "name": "Tabbed App Example", + "start_url": "/", + "display": "standalone", + "display_override": ["tabbed"], + "tab_strip": { + "home_tab": { + "scope_patterns": [ + "/", + "/index.html" + ] + }, + "new_tab_button": { + "url": "/create" + } + } + } ++
+ This example is a tabbed web app that falls back to a single-document
+ standalone window if tabbed mode is not supported. Any navigation to
+ the main index page (either /
or
+ /index.html
) is opened in the [=home tab context=]. Note
+ that query parameters are ignored by default (so a navigation to
+ /index.html?utm_source=foo
will match the home tab
+ scope). The new tab button will open a new tab at
+ /create
.
+
- An application has a home tab if the [=processed + An application has a home tab if the [=Document/processed manifest=] includes a non-null [=home_tab=] member of the [=tab_strip=] member.
@@ -303,10 +302,10 @@
A URL is said to be within home tab scope if it is a
From 176b7541900a3277cf707bb76e6b6777248a95dc Mon Sep 17 00:00:00 2001
From: Matt Giuca
-
|json:ordered map|, and [=ordered map=] |manifest:ordered map|):
- "url" is already defined as a member of another struct. This is - causing linking issues. -
- The [=url=] member is a string that represents a URL relative to the
- [=manifest URL=] that is [=manifest/within scope=] of a
- [=Document/processed manifest=].
+ The url
member
+ is a string that represents a URL relative to the [=manifest URL=]
+ that is [=manifest/within scope=] of a [=Document/processed
+ manifest=].
- "manifest URL" and "start URL" need to be exported from APPMANIFEST. - See w3c/manifest#1112. -
home_tab
member
From d43edf1fce7090a7a31187f9022d7933032727e5 Mon Sep 17 00:00:00 2001
From: Matt Giuca - The home tab scope is a set of [=URLs=] which, if the - application [=has a home tab=], comprises the union of the [=start - URL=] and all URLs |url:URL| to which applying [=URL pattern/match=] - given any element of the [=scope_patterns=] member of the - [=home_tab=] member of the [=tab_strip=] member of the - [=Document/processed manifest=] and |url| returns a - {{URLPatternResult}}. If the application does not [=has a home - tab|have a home tab=], then the [=home tab scope=] is the empty set. + A [=URL=] |url:URL| is said to be within home tab scope if + and only if the application [=has a home tab=] and at least one of + the following conditions are met:
+- A URL is said to be within home tab scope if it is a - member of the [=home tab scope=]. It is outside of home tab - scope if it is not a member of [=home tab scope=]. + The home tab scope is the set of [=URLs=] which are + [=within home tab scope=]. A URL is is outside of home tab + scope if it is not [=within home tab scope=].
+ The [=home tab scope=] is the set of URLs to which the [=home tab + context=] can be navigated. All navigations within the application + to a URL [=within home tab scope=] will be performed in the [=home + tab context=], and all navigations to a URL [=outside of home tab + scope=] will be performed in a different [=application context=], + creating one if necessary. The application's [=start URL=] is + always part of the [=home tab scope=]. +
++ If the application does not [=has a home tab|have a home tab=], + then the [=home tab scope=] is the empty set. +
When an application [=has a home tab=], the user agent SHOULD ensure
From 374724d11cc218d6a8fd69d77d7df0597f46cbd1 Mon Sep 17 00:00:00 2001
From: Matt Giuca
A [=URL=] |url:URL| is said to be within home tab scope if - and only if the application [=has a home tab=] and at least one of - the following conditions are met: + and only if:
From fd980526f4834adbe3ec85621a1f11128c8878e9 Mon Sep 17 00:00:00 2001
From: Matt Giuca
The
- The home tab scope is the set of [=URLs=] which are
- [=within home tab scope=]. A URL is is outside of home tab
- scope if it is not [=within home tab scope=].
+ A URL is is outside of home tab scope if it is not
+ [=within home tab scope=].
- The [=home tab scope=] is the set of URLs to which the [=home tab
- context=] can be navigated. All navigations within the application
+ The "home tab scope" (i.e., the set of [=URLs=] which are [=within
+ home tab scope=]) is the set of URLs to which the [=home tab
+ context=] can be navigated . All navigations within the application
to a URL [=within home tab scope=] will be performed in the [=home
tab context=], and all navigations to a URL [=outside of home tab
- scope=] will be performed in a different [=application context=],
- creating one if necessary. The application's [=start URL=] is
- always part of the [=home tab scope=].
+ scope=] will be performed in a different [=application context=]
+ (i.e., another tab), creating one if necessary. The application's
+ [=start URL=] is always part of the home tab scope.
+
+ For the purpose of matching against the [=start URL=], the
+ [=URL/fragment=] is ignored, but the [=URL/query=] must match
+ exactly.
If the application does not [=has a home tab|have a home tab=],
- then the [=home tab scope=] is the empty set.
+ then the home tab scope is the empty set.
From 21d19e721390cacfd1819aa703379aa46ebb68cd Mon Sep 17 00:00:00 2001
From: Matt Giuca
+ Note that the [=URL/query=] part of the URL is ignored by default
+ when matching against [=tab_strip/home_tab/scope_patterns=] (so a
+ navigation to
scope_patterns
member is a list of
- {{URLPatternInput}}s that define the [=home tab scope|scope of the
- home tab=] relative to the [=manifest URL=].
+ {{URLPatternInput}}s that define the [=within home tab scope|scope of
+ the home tab=] relative to the [=manifest URL=].
"tab_strip": {
"home_tab": {
"scope_patterns": [
- "/",
- "/index.html"
+ {"pathname": "/"},
+ {"pathname": "/index.html"}
]
},
"new_tab_button": {
@@ -607,11 +607,17 @@
This example is a tabbed web app that falls back to a single-document
standalone window if tabbed mode is not supported. Any navigation to
the main index page (either
/
or
- /index.html
) is opened in the [=home tab context=]. Note
- that query parameters are ignored by default (so a navigation to
- /index.html?utm_source=foo
will match the home tab
- scope). The new tab button will open a new tab at
- /create
.
+ /index.html
) is opened in the [=home tab context=]. The
+ new tab button will open a new tab at /create
.
+ /index.html?utm_source=foo
will open in
+ the home tab). However, when matching against [=start URL=], the
+ [=URL/query=] must match exactly, so sites that want to ignore the
+ query are advised to explicitly include the [=start URL=]'s
+ [=URL/path=] as a scope pattern.
- When an application [=has a home tab=], the user agent SHOULD ensure - that at all times: -
-- The rule about "[=initial URL=] is [=within home tab scope=]" is - based on the understanding that "initial URL" refers to the current - URL of the document (not simply the URL initially loaded into the - application context). The "initial" simply refers to not taking into - account changes made to the display URL via the History API. Verify - this and possibly add a note. Also, this is not linkable. Find a way - to reference this aspect of the context (possibly via document). -
-- In order to ensure the above rule that "every application window has - exactly one [=home tab context=]", the user agent will need to create - a new [=home tab context=] whenever a new application window is - created, for example when launching the application, or when moving a - tab to a new window. A newly created [=home tab context=] SHOULD be - navigated to the [=start URL=], which by definition is [=within home - tab scope=]. -
++ If the application [=has a home tab=], whenever a new application + window is created (for example when launching the application, or + when moving a tab to a new window), the user agent MUST create a + new [=home tab context=] in that window. A newly created [=home tab + context=] SHOULD be navigated to the [=start URL=], which by + definition is [=within home tab scope=]. +
++ The above rules are intended to ensure that the following + invariants are always true, for applications that [=has a home + tab|have a home tab=]: +
++ User agents will not dynamically move documents between home-tab + and non-home-tab contexts if they change their [=URL/fragment=], or + use the {{History}} API to modify their display URL into or out of + the home tab scope, because no navigation is taking place. For this + reason, the above invariants only care about the [=Document/URLs=] + that documents had at the time of their creation. +
++ Applications that "pretend" to navigate by modifing their URLs can + detect when they are in tabbed application mode and change their + behaviour to perform actual navigations into and out of the home + tab scope, rather than modifying the URL, to ensure the user agent + correctly opens documents in or out of the [=home tab context=]. +
+If the application does not [=has a home tab|have a home tab=], - then the home tab scope is the empty set. + then the home tab scope is the empty set, and all URLs are + [=outside of home tab scope=].
+ An application has a new tab button if the + [=Document/processed manifest=]'s [=new_tab_button=]'s + [=new_tab_button/url=] member is [=outside of home tab scope=]. If + the application does not [=has a new tab button|have a new tab + button=], the user agent SHOULD NOT make the "new tab" affordance + available to the end user. +
+ The new tab button will be unavailable if its URL is [=within home + tab scope=]. This rule is necessary, since otherwise, it would + either imply that a) the new tab button would open a non-home tab + [=within home tab scope=], violating the third home tab invariant + above, or b) the new tab button would simply focus the home tab, + which would be redundant and confusing UI. +
++ The default value for [=new_tab_button/url=] is the [=start URL=]. + This means the button will be unavailable by default if the + application [=has a home tab=]. +
When the new tab button is activated by the end user, the following @@ -546,16 +566,9 @@
- An application has a home tab if the [=Document/processed - manifest=] includes a non-null [=home_tab=] member of the - [=tab_strip=] member. + An application has a home tab if the applied [=display + mode=] of the application is [=display mode/tabbed=], and the + [=Document/processed manifest=] includes a non-null [=home_tab=] + member of the [=tab_strip=] member.
The home tab context is an optional [=application @@ -293,7 +294,8 @@
How the [=home tab context=] is presented is at the discretion of the - user agent, but it SHOULD have a different appearance to normal tabs. + user agent, but it SHOULD have a different appearance to normal + application contexts.
A [=URL=] |url:URL| is said to be within home tab scope if @@ -330,7 +332,8 @@
For the purpose of matching against the [=start URL=], the
From e41c10c88e41ecd5febd3f02bc54956fec330baf Mon Sep 17 00:00:00 2001
From: Matt Giuca
- If navigating from the [=home tab context=] to a [=URL=] |url:URL|
- that is [=outside of home tab scope=], the following steps are run:
+ If [=navigate|navigating=] from the [=home tab context=] to a
+ [=URL=] |url:URL| that is [=outside of home tab scope=], the
+ following steps are run:
- If navigating to a [=URL=] |url:URL| [=within home tab scope=], the
- following steps are run:
+ If [=navigate|navigating=] to a [=URL=] |url:URL| [=within home tab
+ scope=], the following steps are run:
Navigations concerning the home tab scope
-
steps are run:
- Applications that "pretend" to navigate by modifing their URLs can - detect when they are in tabbed application mode and change their - behaviour to perform actual navigations into and out of the home - tab scope, rather than modifying the URL, to ensure the user agent - correctly opens documents in or out of the [=home tab context=]. + For single-page applications that "pretend" to navigate by + modifying their URLs, this may result in undesirable behaviour that + breaks the above invariants (e.g. if the user clicks a link from + the home tab to dynamically change the URL to a non-home page, they + will stay inside the home tab because it is not actually + navigating). To avoid this situation, the application can detect + when it is in tabbed application mode and change its behavior to + perform actual navigations into and out of the home tab scope, + rather than modifying the URL.
- If [=navigate|navigating=] from the [=home tab context=] to a - [=URL=] |url:URL| that is [=outside of home tab scope=], the - following steps are run: + When [=navigate|navigating=] the [=top-level traversable=] + associated with a [=home tab context=] to a [=URL=] |url:URL| that + is [=outside of home tab scope=], the following steps are run:
"_blank"
and noopener true.
+ The [[HTML]] spec defines + rules for choosing a navigable, mentioned above. However, it is + not exported, so it is unable to be properly linked, and may be + considered a layering violation. +
- If [=navigate|navigating=] to a [=URL=] |url:URL| [=within home tab - scope=], the following steps are run: + When [=navigate|navigating=] a [=top-level traversable=] with a + [=display mode=] of [=display mode/tabbed=] that is not associated + with a [=home tab context=] (i.e. a non-home tab) to a [=URL=] + |url:URL| that is [=within home tab scope=], the following steps + are run:
- The [[HTML]] spec defines - rules for choosing a navigable, mentioned above. However, it is - not exported, so it is unable to be properly linked, and may be - considered a layering violation. -
+
When [=navigate|navigating=] a [=top-level traversable=] with a
[=display mode=] of [=display mode/tabbed=] that is not associated
From 57014a6d0e6d210aaa1a7300252c06ffbf72886b Mon Sep 17 00:00:00 2001
From: Matt Giuca
To process the `home_tab` member, given [=ordered map=]
- |json:ordered map|, [=ordered map=] |manifest tab strip:ordered
- map|, and [=URL=] |manifest URL:URL|, run the following:
+ |json tab strip:ordered map|, [=ordered map=] |manifest tab
+ strip:ordered map|, and [=URL=] |manifest URL:URL|, run the
+ following:
To process the `new_tab_button` member, given [=ordered
- map=] |json:ordered map|, [=ordered map=] |manifest tab
+ map=] |json tab strip:ordered map|, [=ordered map=] |manifest tab
strip:ordered map|, [=URL=] |manifest URL:URL|, and [=URL=] |start
URL:URL|, run the following:
To process the `scope_patterns` member, given [=ordered
- map=] |json:ordered map|, [=ordered map=] |manifest home
+ map=] |json home tab:ordered map|, [=ordered map=] |manifest home
tab:ordered map| and [=URL=] |manifest URL:URL|, run the following:
-
@@ -612,10 +613,11 @@