[webkit-dev] KJS::JSObject question
darin at apple.com
Thu May 14 10:02:13 PDT 2009
On May 14, 2009, at 8:03 AM, Jack Wootton wrote:
> My question: I do not understand how JSObject can be used to allow
My first comment is that you should not be using JSObject directly.
The right way to do this is to use the C-based public API of
internal interface is constantly being changed and not suitable for
use outside the WebKit project.
to work, then the object "a" need a property "b" with a property "c"
that is callable as a function. At each level, the object can just be
a general purpose object with a property attached, which can be set up
with functions like JSObjectSetProperty, or the property can come from
the object’s prototype, or the property can be “built in” to the
object, which can by done with JSClassCreate supplying a
When it comes to the value of the property named "c", to make
something callable as a function, you can either use an actual
such as String.prototype.toLowerCase or you can make an object that
acts like a function using JSClassCreate supplying a
More information about the webkit-dev