make prototype name accessible as __prototype__
This commit is contained in:
parent
b0d134b811
commit
4f34e0f73f
1 changed files with 3 additions and 2 deletions
|
@ -311,8 +311,7 @@ public class ESNode extends ObjectPrototype {
|
|||
checkNode ();
|
||||
// IServer.getLogger().log ("put property called: "+propertyName+", "+propertyValue.getClass());
|
||||
if ("lastmodified".equalsIgnoreCase (propertyName) || "created".equalsIgnoreCase (propertyName) ||
|
||||
"contentlength".equalsIgnoreCase (propertyName) || "cache".equalsIgnoreCase (propertyName) ||
|
||||
"prototype".equalsIgnoreCase (propertyName))
|
||||
"contentlength".equalsIgnoreCase (propertyName) || "cache".equalsIgnoreCase (propertyName))
|
||||
throw new EcmaScriptException ("Can't modify read-only property \""+propertyName+"\".");
|
||||
|
||||
if ("subnodeRelation".equalsIgnoreCase (propertyName)) {
|
||||
|
@ -447,6 +446,8 @@ public class ESNode extends ObjectPrototype {
|
|||
return new ESString (node.getFullName ());
|
||||
if ("__hash__".equals (propertyName))
|
||||
return new ESString (""+node.hashCode ());
|
||||
if ("__prototype__".equals (propertyName))
|
||||
return new ESString (node.getPrototype ());
|
||||
if ("__node__".equals (propertyName))
|
||||
return ESLoader.normalizeObject (node, evaluator);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue