[Webkit-unassigned] [Bug 37921] API to get object class name missing from JSC
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 21 11:01:46 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=37921
--- Comment #6 from Kartikaya Gupta <lists.bugzilla at stakface.com> 2010-04-21 11:01:46 PST ---
> Can you use instanceof / JSValueIsInstanceOfConstructor?
I did consider that but I concluded there wasn't a reliable way to get the
constructor objects for the DOM classes. Doing something like
JSObjectGetProperty to get window.HTMLDocument might return some HTMLDocument
object overriden by a user script. I couldn't find any other way to get the
constructor objects short of diving into WebCore-internal JS bindings.
> ECMA-262 does describe the [[Class]] property, but that description says
> "The value of a [[Class]] property is used internally" -- i.e., it's an
> implementation detail.
If it was really an implementation detail there would be no need to describe it
in the spec. The spec even reserves some values for the [[Class]] property
(e.g. Function, Array) and mandates that they be provided to the user in some
cases (e.g. toString() calls) so I think it qualifies as more than just an
implementation detail.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list