diff --git a/mozilla/js/rhino/org/mozilla/javascript/Scriptable.java b/mozilla/js/rhino/org/mozilla/javascript/Scriptable.java index a45f15fa0f4..c64d7ef7c3d 100644 --- a/mozilla/js/rhino/org/mozilla/javascript/Scriptable.java +++ b/mozilla/js/rhino/org/mozilla/javascript/Scriptable.java @@ -187,7 +187,10 @@ public interface Scriptable { *
  • org.mozilla.javascript.Scriptable objects
  • *
  • null
  • *
  • The value returned by Context.getUndefinedValue()
  • - *

    + *

    + * Arbitrary Java objects may be wrapped in a Scriptable by first calling + * Context.toObject. This allows the property of a JavaScript + * object to contain an arbitrary Java object as a value.

    * Note that has will be called by the runtime first before * set is called to determine in which object the * property is defined. @@ -199,6 +202,7 @@ public interface Scriptable { * @see org.mozilla.javascript.Scriptable#has * @see org.mozilla.javascript.Scriptable#get * @see org.mozilla.javascript.ScriptableObject#putProperty + * @see org.mozilla.javascript.Context#toObject */ public void put(String name, Scriptable start, Object value); diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/Scriptable.java b/mozilla/js/rhino/src/org/mozilla/javascript/Scriptable.java index a45f15fa0f4..c64d7ef7c3d 100644 --- a/mozilla/js/rhino/src/org/mozilla/javascript/Scriptable.java +++ b/mozilla/js/rhino/src/org/mozilla/javascript/Scriptable.java @@ -187,7 +187,10 @@ public interface Scriptable { *

  • org.mozilla.javascript.Scriptable objects
  • *
  • null
  • *
  • The value returned by Context.getUndefinedValue()
  • - *

    + *

    + * Arbitrary Java objects may be wrapped in a Scriptable by first calling + * Context.toObject. This allows the property of a JavaScript + * object to contain an arbitrary Java object as a value.

    * Note that has will be called by the runtime first before * set is called to determine in which object the * property is defined. @@ -199,6 +202,7 @@ public interface Scriptable { * @see org.mozilla.javascript.Scriptable#has * @see org.mozilla.javascript.Scriptable#get * @see org.mozilla.javascript.ScriptableObject#putProperty + * @see org.mozilla.javascript.Context#toObject */ public void put(String name, Scriptable start, Object value);