JSDude wrote:
this.eval — as I understand right is Reference, where
ReferenceName is eval. I'm always think that this is global eval
because it's evaling in context window.
The simple answer on your question is:

eval('...');

The evaluation of MemberExpression return Reference which in abstract view looks:

var reference = {
   base : GlobalEnvironmentRecord,
   referencedName : 'eval',
   strictReference  :  false
};

While in:

this.eval('...');

var reference = {
   base : GlobalObject,
   referencedName : 'eval',
   strictReference  :  false
};

So per first rule for direct call of `eval' defined in:

15.1.2.1.1 Direct Call to Eval:

The Reference that is the result of evaluating the MemberExpression in the CallExpression has an environment
record as its base value and its reference name is "eval".

You should read "10 Executable Code and Execution Contexts" and you will find the answer.


--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to