P. 1
ECMA-262 JavaScript 5

ECMA-262 JavaScript 5

|Views: 218|Likes:
Publicado porGregoryDonaghy

More info:

Published by: GregoryDonaghy on Mar 12, 2010
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

08/16/2013

pdf

text

original

The production UnaryExpression : delete UnaryExpression is evaluated as follows:

1. Let ref be the result of evaluating UnaryExpression.
2. If Type(ref) is not Reference, return true.
3. If IsUnresolvableReference(ref) then,
a. If IsStrictReference(ref) is true, throw a SyntaxError exception.
b. Else, return true.
4. If IsPropertyReference(ref) is true, then
a. Return the result of calling the [[Delete]] internal method on ToObject(GetBase(ref) providing
GetReferencedName(ref) and IsStrictReference(ref) as the arguments.

)

5. Else, ref is a Reference to an Environment Record binding, so
a. If IsStrictReference(ref) is true, throw a SyntaxError exception.
b. Let bindings be GetBase(ref).
c. Return the result of calling the DeleteBinding concrete method of bindings, providing
GetReferencedName(ref) as the argument.

NOTE

When a delete operator occurs within strict mode code, a SyntaxError exception is thrown if its
UnaryExpression is a direct reference to a variable, function argument, or function name. In addition, if a delete operator
occurs within strict mode code and the property to be deleted has the attribute { [[Configurable]]: false }, a TypeError
exception is thrown.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->