Skip to content

Commit

Permalink
Gracefully handle documents that are not fully active (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Jul 15, 2021
1 parent e3f4d84 commit f4605e5
Showing 1 changed file with 36 additions and 7 deletions.
43 changes: 36 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
};
</script>
</head>
<body data-cite="secure-contexts permissions-policy permissions">
<body data-cite=
"secure-contexts permissions-policy permissions page-visibility-2">
<section id="abstract">
<p>
The Geolocation API provides access to geographical location
Expand Down Expand Up @@ -118,6 +119,9 @@ <h2>
has received the following changes:
</p>
<ul>
<li>Added handling for when documents are not [=Document/fully
active=].
</li>
<li>Added the [=geolocation task source=], which handles dispatching
position updates and errors.
</li>
Expand Down Expand Up @@ -591,6 +595,10 @@ <h2>
optionally (and only if |repeats| is true) a |previousId:long|.
</p>
<ol class="algorithm">
<li>If the [=current settings object=]'s [=associated `Document`=] is
not [=Document/fully active=], return an [=implementation-defined=]
{{long}}.
</li>
<li>Let |watchTasks:Set| be [=this=]'s
{{Geolocation/[[watchTasks]]}}.
</li>
Expand Down Expand Up @@ -621,15 +629,17 @@ <h2>
</li>
</ol>
</li>
<li data-cite="page-visibility-2">Wait for document to become
visible.
<li>Wait for document to become visible.
<ol>
<li>Let |document:Document| be the [=current settings
object=]'s [=associated Document=].
</li>
<li>If |document:Document| is [=Document/hidden=], wait for
the |document| to become [=Document/visible=].
</li>
<li>Go to <a href="#wait-for-change">wait for significant
change of geographic position</a>.
</li>
</ol>
</li>
<li data-tests=
Expand Down Expand Up @@ -747,10 +757,29 @@ <h2>
</li>
</ol>
</li>
<li>Wait for a significant change of geographic position. What
constitutes a significant change of geographic position is left
to the implementation. User agents MAY impose a rate limit on the
frequency position changes.
<li>
<span id="wait-for-change">Wait for a significant change of
geographic position</span>. What constitutes a significant
change of geographic position is left to the implementation.
User agents MAY impose a rate limit on the frequency position
changes.
</li>
<li>If |document| is not [=Document/fully active=] or not
[=Document/visible=], go back to the previous step and again
<a href="#wait-for-change">wait for significant change of
geographic position</a>.
<aside class="note" title=
"Position updates are exclusively for fully-active visible documents">
<p>
The desired effect here being that position updates are
exclusively delivered to fully active documents that are
visible; Otherwise the updates get silently "dropped on the
floor". Only once a document again becomes fully active and
visible (e.g., an [^iframe^] gets reattached to a parent
document), do the position updates once again start getting
delivered.
</p>
</aside>
</li>
<li>If |watchTasks| [=list/contain|contains=] |watchId|, then:
<ol>
Expand Down

0 comments on commit f4605e5

Please sign in to comment.