Back to Chromium

Eval Keyword Vs Function

third_party/blink/web_tests/fast/js/eval-keyword-vs-function.html

149.0.7827.2502 B
Original Source

This page verifies that eval has two meanings:

  1. An operator: executes a script in local scope with the local scope's variable object and "this" object.
  2. A global function: executes a script in global scope with the global scope's variable object and "this" object.

Meaning #2 should remain constant even if the global eval function is copied into a global variable ("globalEval") or a local variable ("localEval").

If the test passes, you'll see a series of pass messages below.