Re: [whatwg/fetch] [WebDriver BiDi] emulated network offline (PR #1852)

@annevk commented on this pull request.



> @@ -412,6 +412,21 @@ steps:
 </ol>
 </div>
 
+<p>A <dfn export>user agent is offline</dfn> when the user agent assumes it do not have network
+connection, and it will not contact the network during <a lt=fetch for=/>fetching</a>.
+
+<div algorithm>
+<p>To check if the <a>environment settings object</a> <var>environment</var>
+<dfn export lt="environment is offline">is offline</dfn>, return true if one of the following
+conditions are true, and return false otherwise:
+
+<ul>
+ <li><p>[=/User agent is offline=]</li>
+
+ <li><p><var>environment</var>'s <a>WebDriver BiDi network is offline</a>.
+</ul>
+</div>

I would inline "user agent is offline" as we have no need for it standalone at the moment and make it a proper algorithm. So something like

> To check if an environment ... is offline:
> 1. If the user agent assumes it does not have internet connectivity, then return true.
> 2. Return _environment_'s WebDriver BiDi network is offline.

Apart from that this looks good to me.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1852#pullrequestreview-3321953322
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1852/review/3321953322@github.com>

Received on Friday, 10 October 2025 08:24:28 UTC