XPConnect Chrome Object Wrappers: Difference between revisions

Jump to navigation Jump to search
→‎COWing Objects: fixed outdated info
(→‎COWing Objects: rewording)
(→‎COWing Objects: fixed outdated info)
Line 59: Line 59:
   baz: "I am protected information"
   baz: "I am protected information"
}
}
MyObj.foo.__callableByContent__ = true;
</pre>
</pre>


In the above example, <tt>MyObj.foo()</tt> can be accessed but not assigned to&mdash;and <tt>foo()</tt> itself is callable from content, since <tt>__callableByContent__</tt> is set&mdash;and <tt>MyObj.bar</tt> is both readable and writable, while <tt>MyObj.baz</tt> can't be accessed at all.
In the above example, <tt>MyObj.foo()</tt> can be accessed but not assigned to, <tt>foo()</tt> itself is callable from content, and <tt>MyObj.bar</tt> is both readable and writable, while <tt>MyObj.baz</tt> can't be accessed at all.


All properties that are exposed to content are enumerable by content as well.
All properties that are exposed to content are enumerable by content as well.
874

edits

Navigation menu