Re: [NavigationTiming] onload event can't get the 'performance.getEntriesByType("navigation")[0]'

and make sure your code runs after onload, just to verify.

On Fri, Apr 7, 2017 at 11:37 AM, Ilya Grigorik <igrigorik@google.com> wrote:

> Hi Zhou.
>
> Chrome shipped NT2 in M57 [1], so what you're describing should work (I
> see entries coming back here). That said, since this looks like a browser
> specific implementation question.. let's take this discussion to crbug.com
> - can you please file the bug there and CC me?
>
> Thanks!
> ig
>
> [1] https://www.chromestatus.com/feature/5409443269312512
>
> On Thu, Apr 6, 2017 at 10:44 PM, 周显风 <tianwang959595@gmail.com> wrote:
>
>> Hello,
>>
>>          I am a developer in China.my name is Zhou Xianfeng.
>>
>>          I have read the document in https://www.w3.org/TR/navig
>> ation-timing-2/ .But when I test the example3 mentioned in the document,
>> it can’t work.
>>
>>          So ,I check the “performance.getEntriesByType(‘navigation’)”.
>> It is strange that the length of the array returned is 0.But when I write
>> it in the developer tools,I can get the right result.
>>
>>          Can you tell me how I can get the right result of
>> “performance.getEntriesByType(‘navigation’)”.
>>
>>
>>
>>          Environment:
>>
>>                    Crome  57.0.2987.133
>>
>>
>>
>>
>>                                    Zhou Xianfeng
>>
>>
>>
>>
>>                                    Sincerely yours
>>
>
>


--

Received on Friday, 7 April 2017 16:34:17 UTC