[Webkit-unassigned] [Bug 14547] typeof document.body.childNodes=="function" ("object" expected)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 13 21:17:12 PDT 2007


------- Comment #17 from mjs at apple.com  2007-10-13 21:17 PDT -------
Please, ladies & gentlemen, let's try to remain courteous in these discussions.

It's probably true that many of the issues noted by the test are not required
by the relevant specs. However, we may have to implement some of those things
for compatibility. The best thing to do with this bug report would be to split
off a separate bug for each individual issue, rather than making this a master
bug for dozens of DOM binding quirks. For each individual issue, it would be
great to know:

1) Do the relevant specs require this behavior? (Probably the answer is no in
most cases, since the ECMAScript spec has pretty loose rules for host objects,
and the DOM specs are not very detailed in specifying how JS bindings should

2) Do the relevant specs forbid this behavior? We're somewhat hesitant to
outright violate specs, even in cases where there might be some effect on

3) Is the behavior required for compatibility, or just a minor corner case?

In the case of the original function vs. object thing for NodeLists, it's clear
that neither the ECMA-262 spec or the DOM spec require typeof to return
"object". It's also clear that this is not forbidden - the ECMAScript spec
allows host objects to return anything whatsoever from "typeof". And it's clear
that returning "object" matters to web compatibility. Therefore we should give
a typeof result of object. This may require objects to gain an isFunction()
method in addition to implementsCall(), which can default to calling
implementsCall() but which is overridable.

I'm not sure what the answer is for the many other issues mentioned in this
bug. They deserve separate bug reports and someone should do the analogous

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list