title: How to use PuppeteerSharp to get the value of performance.timeOrigin?
body: <p>Using PuppeteerSharp, I am attempting to get the <code>performance.timeOrigin</code> value using the C# code below:</p>
  
  <pre><code>JToken performanceTimeOriginString = await _page.EvaluateFunctionAsync("JSON.stringify(performance.timeOrigin);").ConfigureAwait(false);
  </code></pre>
  
  <p>I have verified that this works in a JavaScript console:
  <a href="https://i.stack.imgur.com/LlgY6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LlgY6.png" alt="enter image description here"></a></p>
  
  <p>However, when I run the above PuppeteerSharp code, I get the following exception:</p>
  
  <pre><code>System.AggregateException: One or more errors occurred. (Evaluation failed: SyntaxError: Unexpected token ';') ---&gt; PuppeteerSharp.EvaluationFailedException: Evaluation failed: SyntaxError: Unexpected token ';'
  at PuppeteerSharp.ExecutionContext.ExecuteEvaluationAsync(String method, Object args)
  at PuppeteerSharp.ExecutionContext.RemoteObjectTaskToObject[T](Task`1 remote)
  at PuppeteerSharp.DOMWorld.EvaluateFunctionAsync[T](String script, Object[] args)
  --- End of inner exception stack trace ---
  </code></pre>
  
  <p>It was telling me to remove the semicolon (very odd), so I tried that but then got the below exception.</p>
  
  <pre><code>System.AggregateException: One or more errors occurred. (Protocol error (Runtime.callFunctionOn): Given expression does not evaluate to a function) ---&gt; PuppeteerSharp.EvaluationFailedException: Protocol error (Runtime.callFunctionOn): Given expression does not evaluate to a function ---&gt; PuppeteerSharp.MessageException: Protocol error (Runtime.callFunctionOn): Given expression does not evaluate to a function
  at PuppeteerSharp.CDPSession.SendAsync(String method, Object args, Boolean waitForCallback)
  at PuppeteerSharp.CDPSession.SendAsync[T](String method, Object args)
  at PuppeteerSharp.ExecutionContext.ExecuteEvaluationAsync(String method, Object args)
  --- End of inner exception stack trace ---
  </code></pre>
  
  <p><strong>How can I use PuppeteerSharp to get the value of <code>performance.timeOrigin</code>?</strong></p>