Skip to content

Commit f4605e5

Browse files
Gracefully handle documents that are not fully active (#90)
1 parent e3f4d84 commit f4605e5

File tree

1 file changed

+36
-7
lines changed

1 file changed

+36
-7
lines changed

‎index.html

+36-7
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
};
3939
</script>
4040
</head>
41-
<body data-cite="secure-contexts permissions-policy permissions">
41+
<body data-cite=
42+
"secure-contexts permissions-policy permissions page-visibility-2">
4243
<section id="abstract">
4344
<p>
4445
The Geolocation API provides access to geographical location
@@ -118,6 +119,9 @@ <h2>
118119
has received the following changes:
119120
</p>
120121
<ul>
122+
<li>Added handling for when documents are not [=Document/fully
123+
active=].
124+
</li>
121125
<li>Added the [=geolocation task source=], which handles dispatching
122126
position updates and errors.
123127
</li>
@@ -591,6 +595,10 @@ <h2>
591595
optionally (and only if |repeats| is true) a |previousId:long|.
592596
</p>
593597
<ol class="algorithm">
598+
<li>If the [=current settings object=]'s [=associated `Document`=] is
599+
not [=Document/fully active=], return an [=implementation-defined=]
600+
{{long}}.
601+
</li>
594602
<li>Let |watchTasks:Set| be [=this=]'s
595603
{{Geolocation/[[watchTasks]]}}.
596604
</li>
@@ -621,15 +629,17 @@ <h2>
621629
</li>
622630
</ol>
623631
</li>
624-
<li data-cite="page-visibility-2">Wait for document to become
625-
visible.
632+
<li>Wait for document to become visible.
626633
<ol>
627634
<li>Let |document:Document| be the [=current settings
628635
object=]'s [=associated Document=].
629636
</li>
630637
<li>If |document:Document| is [=Document/hidden=], wait for
631638
the |document| to become [=Document/visible=].
632639
</li>
640+
<li>Go to <a href="#wait-for-change">wait for significant
641+
change of geographic position</a>.
642+
</li>
633643
</ol>
634644
</li>
635645
<li data-tests=
@@ -747,10 +757,29 @@ <h2>
747757
</li>
748758
</ol>
749759
</li>
750-
<li>Wait for a significant change of geographic position. What
751-
constitutes a significant change of geographic position is left
752-
to the implementation. User agents MAY impose a rate limit on the
753-
frequency position changes.
760+
<li>
761+
<span id="wait-for-change">Wait for a significant change of
762+
geographic position</span>. What constitutes a significant
763+
change of geographic position is left to the implementation.
764+
User agents MAY impose a rate limit on the frequency position
765+
changes.
766+
</li>
767+
<li>If |document| is not [=Document/fully active=] or not
768+
[=Document/visible=], go back to the previous step and again
769+
<a href="#wait-for-change">wait for significant change of
770+
geographic position</a>.
771+
<aside class="note" title=
772+
"Position updates are exclusively for fully-active visible documents">
773+
<p>
774+
The desired effect here being that position updates are
775+
exclusively delivered to fully active documents that are
776+
visible; Otherwise the updates get silently "dropped on the
777+
floor". Only once a document again becomes fully active and
778+
visible (e.g., an [^iframe^] gets reattached to a parent
779+
document), do the position updates once again start getting
780+
delivered.
781+
</p>
782+
</aside>
754783
</li>
755784
<li>If |watchTasks| [=list/contain|contains=] |watchId|, then:
756785
<ol>

0 commit comments

Comments
 (0)