You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All documentation, code, and communication under this repository are covered by the [W3C Code of Ethics and Professional Conduct](https://www.w3.org/Consortium/cepc/).
This repository is being used for work in the W3C [Web Platform Incubator Community Group](https://www.w3.org/community/wicg/) (WICG), governed by the [W3C Community License Agreement (CLA)](http://www.w3.org/community/about/agreements/cla/). To make substantive contributions, you must join the Community Group, thus signing the CLA.
6
+
7
+
## Editing the specification
8
+
9
+
Edits to the specification are done in the `spec.bs` file, which is then compiled with the [Bikeshed](https://tabatkins.github.io/bikeshed/) spec pre-processor.
10
+
11
+
To build the specification, you can use one of:
12
+
13
+
-`make local`: uses a locally-installed copy of Bikeshed
14
+
-`make remote`: uses a Bikeshed web service, so you don't have to install anything locally
15
+
16
+
## Tests
17
+
18
+
Tests are maintained as part of the [web platform tests](https://github.com/web-platform-tests/wpt) project, under the [`lifecycle`](https://github.com/web-platform-tests/wpt/tree/master/lifecycle) directory.
19
+
20
+
## For maintainers: identifying contributors to a pull request
21
+
22
+
If the author is not the sole contributor to a pull request, please identify all contributors in the pull request comment.
23
+
24
+
To add a contributor (other than the author, which is automatic), mark them one per line as follows:
25
+
26
+
```
27
+
+@github_username
28
+
```
29
+
30
+
If you added a contributor by mistake, you can remove them in a comment with:
31
+
32
+
```
33
+
-@github_username
34
+
```
35
+
36
+
If the author is making a pull request on behalf of someone else but they had no part in designing the feature, you can remove them with the above syntax.
All Reports in this Repository are licensed by Contributors under the [W3C Software and Document License](http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).
2
+
3
+
Contributions to Specifications are made under the [W3C CLA](https://www.w3.org/community/about/agreements/cla/).
Copy file name to clipboardexpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Lifecycle API for Web Pages
2
-
Link to spec: https://wicg.github.io/page-lifecycle/spec.html
2
+
Link to spec: https://wicg.github.io/page-lifecycle/
3
3
4
4
## Motivation
5
5
For detailed motivation see [this doc](https://docs.google.com/document/d/1UuS6ff4Fd4igZgL50LDS8MeROVrOfkN13RbiP2nTT9I/edit#heading=h.ejq0luje6eyb).
@@ -61,7 +61,7 @@ It is not possible to have a guaranteed callback execute in most of these scenar
61
61
We following changes are included in the MVP:
62
62
63
63
*`onfreeze` is fired to signal transition to FROZEN.
64
-
*`onresume` is fired to signal transition out of FROZEN. This will be used to undo what was done in `onfreeze` above.
64
+
*`onresume` is fired to signal transition out of FROZEN. This will be used to undo what was done in `onfreeze` above.
65
65
* On DISCARDED -> ACTIVE, an attribute called `wasDiscarded` is added to the Document. This will be used to restore view state , when the user revisits a discarded tab.
66
66
*`onfreeze` is also fired before transition to BFCACHE (before `pagehide` is fired) and `onresume` is also fired on transition out of BFCACHE (after `pageshow` is fired).
67
67
@@ -81,7 +81,7 @@ The callbacks are necessary for several reasons:
81
81
* Platform predictability and transparency in the face of freezing & discarding interventions becoming the norm. Specifically helping:
82
82
* Analytics
83
83
* Testing story
84
-
84
+
85
85
For details see [this section of detailed doc](https://docs.google.com/document/d/1UuS6ff4Fd4igZgL50LDS8MeROVrOfkN13RbiP2nTT9I/edit#heading=h.s64wegvpugn9).
86
86
87
87
### API
@@ -129,15 +129,15 @@ if (document.wasDiscarded) {
129
129
#### Potential future addition
130
130
In the future, if frame-level freezing (i.e. freeze specific frames within a page) is pursued, then the API could be enhanced to indicate which frame tree is frozen.
131
131
```
132
-
// Indicate what is frozen exactly:
132
+
// Indicate what is frozen exactly:
133
133
// a. partial frame tree starting with current frame
134
134
// b. partial frame tree starting with an ancestor frame
Copy file name to clipboardexpand all lines: spec.bs
+6-7
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
<pre class='metadata'>
2
2
Title: Page Lifecycle
3
-
Group: webperf
3
+
Group: WICG
4
+
Status: CG-DRAFT
4
5
Shortname: page-lifecycle
5
6
Level: 1
6
-
ED:
7
-
TR:
8
-
Status: ED
7
+
URL: https://wicg.github.io/page-lifecycle/
9
8
Editor: Shubhie Panicker, Google https://google.com, [email protected]
10
9
Editor: Domenic Denicola, Google https://google.com, [email protected]
11
10
Repository: wicg/page-lifecycle
@@ -265,8 +264,8 @@ Specific examples:
265
264
266
265
NOTE: background tabs that are actively doing work on behalf of the user (eg. playing audio) are generally not [=/frozen=] or [=/discarded=].
267
266
268
-
NOTE: For a detailed list of heuristics & exclusions used by Chrome, see <a href=https://docs.google.com/document/d/1QJpuBTdllLVflMJSov0tlFX3e3yfSfd_-al2IBavbQM/edit>this doc</a>.
269
-
267
+
NOTE: For a detailed list of heuristics & exclusions used by Chrome, see <a href=https://docs.google.com/document/d/1QJpuBTdllLVflMJSov0tlFX3e3yfSfd_-al2IBavbQM/edit>this doc</a>.
268
+
270
269
The UA will typically execute [=change the frozenness of a top-level document=] with false when the user revisits that browsing context. In addition, the UA may choose to periodically execute [=change the frozenness of a top-level document=] with false in the background, if plentiful resources are available.
271
270
272
271
<h4 id="changing-frozenness">Changing the frozenness of documents</h4>
@@ -332,7 +331,7 @@ Browsing contexts -- that are in the background and have their documents in <a h
332
331
333
332
NOTE: background tabs that are actively doing work on behalf of the user (eg. playing audio) are generally not [=/discarded=].
334
333
335
-
NOTE: For a detailed list of heuristics & exclusions used by Chrome, see <a href=https://docs.google.com/document/d/1QJpuBTdllLVflMJSov0tlFX3e3yfSfd_-al2IBavbQM/edit>this doc</a>.
334
+
NOTE: For a detailed list of heuristics & exclusions used by Chrome, see <a href=https://docs.google.com/document/d/1QJpuBTdllLVflMJSov0tlFX3e3yfSfd_-al2IBavbQM/edit>this doc</a>.
336
335
337
336
When a [=top-level browsing context=] (tab in the browser) is [=/discarded=] due to resource pressure (or unexpected events eg. process crash), and later the user revisits the tab in the browser, then the {{Document}}'s [=Document/discarded=] boolean will be true due to [[#html-initialize-doc]].
0 commit comments