- From: Ilya Grigorik <igrigorik@google.com>
- Date: Thu, 4 Jun 2015 10:10:39 -0700
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: Jonas Sicking <jonas@sicking.cc>, "public-web-perf@w3.org" <public-web-perf@w3.org>, Przemysław Pietrzkiewicz <ppi@google.com>
- Message-ID: <CADXXVKpC=cw967tJnnpwbwwcpk95k_1JAm59v66PPLQXNsKyDQ@mail.gmail.com>
+ppi On Wed, Jun 3, 2015 at 6:20 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote: > On 6/3/15 6:31 PM, Ilya Grigorik wrote: > >> Current definition links "start of navigation" to: >> http://www.w3.org/TR/html5/browsers.html#navigate - I think that ought >> to cover all the cases, no? >> > > No. Some windows are created without that algorithm actually happening. > > It's not clear to me how/who would use this API outside of those cases. >> > > Script running in an initial about:blank iframe, since that never involves > navigation. > Seriously, you just want to use the definition at > http://www.w3.org/TR/navigation-timing/#dom-performancetiming-navigationstart > since we've been through all this pain before. ;) > Ah, interesting, I was looking at NT2, which in turn relies on HR spec.. and that's what we're trying to define here. On a related note, we have ppi's (cc'ed) proposal [1] to update NT2 time origin definition to: "Time of starting the [navigation][2] responsible for loading the current document, unless a confirmation dialog is displayed during the [prompt to unload][3] algorithm, in which case the time of the user confirming the navigation must be used instead." [1] https://lists.w3.org/Archives/Public/public-web-perf/2014Oct/0113.html [2] http://www.w3.org/TR/html5/browsers.html#navigate [3] http://www.w3.org/TR/html5/browsers.html#prompt-to-unload-a-document Reconciling that with earlier proposal in this thread, how about: "If the settings object specified by the incumbent settings object is a Window object, the time origin must be equal to the time of starting the [navigation][2] responsible for loading the current document, unless a confirmation dialog is displayed during the [prompt to unload][3] algorithm, in which case the time of the user confirming the navigation must be used instead." settings object is a WorkerGlobalScope object (dedicated worker), >> or >> a SharedWorkerGlobalScope object (shared worker) >> >> Hmm, ServiceWorkerGlobalScope inherits from WorkerGlobalScope. >> > > So does SharedWorkerGlobalScope, no? So why do you need a > SharedWorkerGlobalScope case here at all? That was the part that confused > me. Ah, fair enough. In which case I guess we can simplify it to: "If the global settings object specified by the incumbent settings object is a WorkerGlobalScope object, the time origin must be equal to the time [when the worker script settings object is set up]( http://dev.w3.org/html5/workers/#set-up-a-worker-script-settings-object). > I'll admit to having very limited knowledge of Realms.. and it sounds >> like it's still a WIP. I'd suggest we defer this one for now? >> > > Well, you need to define the behavior. One option is to simply say that > when the incumbent settings global has no timebase (as in, doesn't fall > into one of the cases that define a timebase for a global) then workerStart > returns 0 or throws or something. "The workerStart attribute MUST return a DOMHighResTimeStamp representing the difference between the worker's time origin and the time origin of the incumbent settings object. If the incumbent settings object's time origin is undefined, the workerStart MUST return 0." Yay/nay?
Received on Thursday, 4 June 2015 17:11:50 UTC