<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>14547</bug_id>
          
          <creation_ts>2007-07-07 04:44:21 -0700</creation_ts>
          <short_desc>typeof document.body.childNodes==&quot;function&quot; (&quot;object&quot; expected)</short_desc>
          <delta_ts>2022-06-14 17:44:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac (PowerPC)</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>javascript:alert(typeof document.body.childNodes())</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Doeke Zanstra">doekman</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>arv</cc>
    
    <cc>bugs+webkit</cc>
    
    <cc>eric</cc>
    
    <cc>ggaren</cc>
    
    <cc>heycam</cc>
    
    <cc>ian</cc>
    
    <cc>Meanjeanaco</cc>
    
    <cc>m.goleb+bugzilla</cc>
    
    <cc>mrowe</cc>
    
    <cc>oliver</cc>
    
    <cc>sam</cc>
    
    <cc>xk1t</cc>
    
    <cc>ysuzuki</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>5294</commentid>
    <comment_count>0</comment_count>
    <who name="Doeke Zanstra">doekman</who>
    <bug_when>2007-07-07 04:44:21 -0700</bug_when>
    <thetext>Javascript&apos;s type of an NodeList is &quot;function&quot;, where &quot;object&quot; is expected.

testcase: typeof document.body.childNodes
expected result: &quot;object&quot;
actual result: &quot;function&quot;

This also goes for the XML DOM, though I don&apos;t have a testcase. I encountered the same behaviour with XMLHttpRequest.responseXML

Rationale: Firefox 2, IE6 and Opera9 all report &quot;object&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5204</commentid>
    <comment_count>1</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-07-07 13:45:10 -0700</bug_when>
    <thetext>Confirmed with a local debug build of WebKit r24089 on Safari 3.0 (522.12) using Mac OS X 10.4.10 (8R218).

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1398</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2007-08-27 02:44:42 -0700</bug_when>
    <thetext>*** Bug 15089 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1399</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-08-27 02:56:10 -0700</bug_when>
    <thetext>&lt;rdar://problem/5439389&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1150</commentid>
    <comment_count>4</comment_count>
    <who name="John Sullivan">sullivan</who>
    <bug_when>2007-08-30 14:49:25 -0700</bug_when>
    <thetext>Do we know of any real-world sites that this affects? Do we know if it&apos;s a regression from earlier WebKit behavior?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1152</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-08-30 15:02:01 -0700</bug_when>
    <thetext>This affects the jQuery JavaScript library which is widly used, though they currently have a workaround in place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1126</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-08-30 21:31:24 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Do we know of any real-world sites that this affects? Do we know if it&apos;s a
&gt; regression from earlier WebKit behavior?

It is not a regression since Safari 2.0.4 (419.3) with original WebKit also returns &quot;function&quot; for the test URL.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1119</commentid>
    <comment_count>7</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-08-30 23:32:19 -0700</bug_when>
    <thetext>The reason NodeLists report there type as function is that they implement call() and the implementation of typeof checks to see if implementsCall() returns true (which it does).   (see http://trac.webkit.org/projects/webkit/browser/trunk/JavaScriptCore/kjs/nodes.cpp#L977).  </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1120</commentid>
    <comment_count>8</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-08-30 23:44:58 -0700</bug_when>
    <thetext>Why does it implement call?  document.body.childNodes() throws an exception in Firefox (Error: document.body.childNodes is not a function) while we return undefined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1122</commentid>
    <comment_count>9</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-08-30 23:51:30 -0700</bug_when>
    <thetext>Sam informs me that it does so because Internet Explorer does so.  document.body.childNodes(1) is the same as document.body.childNodes[1].  Ugh.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1117</commentid>
    <comment_count>10</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2007-08-31 00:33:32 -0700</bug_when>
    <thetext>This also is true for HTMLCollections.  For instance, typeof document.images == &quot;function&quot;. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58267</commentid>
    <comment_count>11</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2007-10-10 17:23:34 -0700</bug_when>
    <thetext>Objects that do not support call or construct are not functions.

typeof window.constructor == &quot;function&quot;

Typeof should return something other than function.

This makes it harder to typecheck.

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58268</commentid>
    <comment_count>12</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2007-10-10 17:29:56 -0700</bug_when>
    <thetext>A workaround:
var isFunction = function( fn ) {
  return typeof fn == &quot;function&quot; &amp;&amp; 
    typeof fn.hasOwnProperty == &quot;function&quot; &amp;&amp; fn.hasOwnProperty(&apos;prototype&apos;);
};

More on this:
http://dhtmlkitchen.com/?category=/JavaScript/&amp;date=2007/10/10/&amp;entry=How-to-Tell-if-an-Object-is-a-Function#safari-anwser

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58277</commentid>
    <comment_count>13</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2007-10-10 20:29:51 -0700</bug_when>
    <thetext>The error I get is:

&quot;TypeError: Value undefined (result of expression document.body.childNodes.call) is not object.
undefined

http://trac.webkit.org/projects/webkit/browser/trunk/JavaScriptCore/kjs/nodes.cpp#L636
636 	  if (!v-&gt;isObject()) {
637 	    return throwError(exec, TypeError, &quot;Value %s (result of expression %s) is not object.&quot;, v, expr.get());
638 	  }


The jQuery patch will return incorrect results under several obvious conditions that I have posted on my blog entry.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58425</commentid>
    <comment_count>14</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2007-10-13 13:34:33 -0700</bug_when>
    <thetext>Updated test case. Try &amp; break it.
http://dhtmlkitchen.com/jstest/isFunctionTest.html


I noticed several problems:

1) constructor property missing:

&quot;constructor&quot; in document.getElementsByTagName(&quot;div&quot;); // false

2)
toString reflects the [[class]] as NodeList:
document.getElementsByTagName(&quot;div&quot;).toString();// [object NodeList]
document.getElementsByTagName(&quot;div&quot;).__proto__ === null; // true

&quot;NodeList&quot; in window; // false

3)
prototype property is missing from built-in functions.
Function.prototype.prototype // undefined, should be an object.
parseInt.prototype; // undefined, should be an object.


</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58436</commentid>
    <comment_count>15</comment_count>
    <who name="Richard Cornford">Richard</who>
    <bug_when>2007-10-13 18:41:09 -0700</bug_when>
    <thetext>(In reply to comment #14)

Updated test case. Try &amp; break it.
http://dhtmlkitchen.com/jstest/isFunctionTest.html

&gt; I noticed several problems:

&gt; 1) constructor property missing:

&gt; &quot;constructor&quot; in document.getElementsByTagName(&quot;div&quot;); // false

In ECMAScript terms the object retuned from a call to - getElementsByTagName - is a host object, and host objects are not required to have a - constructor - property. The W3C DOM specification for the NodeList interface also does not define a - constructor - property. So there is no technical justification for anyone to expect the object returned from a call to - getElementsByTagName - to have a - constructor - property. Thus the absence of such a property cannot be regarded as in any way erroneous. Instead any error would be in the thinking of anyone who expected/demanded it.

&gt; 2)
&gt; toString reflects the [[class]] as NodeList:

Why would that be a problem? There is nothing that says it should not.

&gt; document.getElementsByTagName(&quot;div&quot;).toString();// [object NodeList]

Why would that be a problem? There is nothing that says it should not.

&gt; document.getElementsByTagName(&quot;div&quot;).__proto__ === null; // true

Why would that be a problem? There is nothing that says it should not.

&gt; &quot;NodeList&quot; in window; // false

Why would that be a problem? There is nothing that says it should not.

&gt; 3)
&gt; prototype property is missing from built-in functions.

Not all of them, and ECMA 262 3rd Ed, Section 15 paragraph 9 says:-

&quot;None of the built-in functions described in this section shall implement the internal [[Construct]] method unless otherwise specified in the description of a particular function. None of the built-in functions described in this section shall initially have a prototype property unless otherwise specified in the description of a particular function.&quot;

- so where not &quot;otherwise specified&quot; no prototype property should be expected.

&gt; Function.prototype.prototype // undefined, should be an object.

That actually would be a bug, but an utterly insignificant one as nobody is likely to be interested in Function.prototype.prototype.

&gt; parseInt.prototype; // undefined, should be an object.

No it should not as for - parseInt - there is nothing to &apos;otherwise specify&apos; and so section 15 paragraph 9 applies.

Generally this entire &apos;bug report&apos; is bogus. The W3C specifies NodeList, HTMLCollection, etc., as interfaces. For ECMAScript the implications of this are not that there should be a NodeList class in the environment but instead that when you get an object that &quot;is a NodeList&quot; what you actually get is an object that implements the NodeList interface (nothing more than an object that has all of the methods and properties defined in the ECMAScript binding for the interface), and that can be any object so long as it implements the interface correctly. In ECMAScript/javascript functions are objects, so there is no reason for the object implementing the NodeList interface not being a function object. That may not be required but it certainly is not excluded, or particularly unexpected by anyone with any experience of scripting web browsers. Historically the typeof operator would return &apos;function&apos; for all objects implanting NodeList, NamedNodeMap, HTMLCollection and even all pre-DOM collections in Mac IE, Konqueror, Opera versions up 7, IceBrowser versions up to 5 and probably at least some others. And in all cases these object were callable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58440</commentid>
    <comment_count>16</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2007-10-13 20:09:25 -0700</bug_when>
    <thetext>(In reply to comment #15)
&gt; (In reply to comment #14)
&gt;
&gt; Updated test case. Try &amp; break it.
&gt; http://dhtmlkitchen.com/jstest/isFunctionTest.html
&gt;
&gt; &gt; I noticed several problems:
&gt;
&gt; &gt; 1) constructor property missing:
&gt;
&gt; &gt; &quot;constructor&quot; in document.getElementsByTagName(&quot;div&quot;); // false
&gt;
&gt; In ECMAScript terms the object retuned from a call to - getElementsByTagName -
&gt; is a host object, and host objects are not required to have a - constructor -
&gt; property.
The constructor property would be on the object&apos;s [[Prototype]]


The W3C DOM specification for the NodeList interface also does not
&gt; define a - constructor - property. So there is no technical justification for
&gt; anyone to expect the object returned from a call to - getElementsByTagName - to
&gt; have a - constructor - property. Thus the absence of such a property cannot be
&gt; regarded as in any way erroneous. Instead any error would be in the thinking of
&gt; anyone who expected/demanded it.
&gt;

A NodeList is an object. Error in thinking, huh?


&gt; &gt; 2)
&gt; &gt; toString reflects the [[class]] as NodeList:
&gt;
&gt; Why would that be a problem? There is nothing that says it should not.
&gt;
The fact that constructor is null.

[[class]] comes from the constructor.

So it sounds like you&apos;re trying to say that an object&apos;s [[class]] doesn&apos;t imply that an object&apos;s has the same constructor. If that&apos;s what you&apos;re trying to say, that is technically correct. The class doesn&apos;t imply the constructor, it&apos;s the other way around.


Ab object (nodeList in this case) COULD get its [[class]]
from an internal private function, where private is implementation
defined. 



If the class property is NodeList, the object should be a NodeList.


&gt; &gt; document.getElementsByTagName(&quot;div&quot;).toString();// [object NodeList]
&gt;
&gt; Why would that be a problem? There is nothing that says it should not.
&gt;
&gt; &gt; document.getElementsByTagName(&quot;div&quot;).__proto__ === null; // true
&gt;
&gt; Why would that be a problem? There is nothing that says it should not.
&gt;

javascript:alert(document.body.childNodes[1].toString ===
Object.prototype.toString)

We got Object.prototype.toString and all the other methods off Object.prototype. 

What happened to the constructor? 

The [[Prototype]] was not set, but all the methods are there.

To me, that seems strange.


&gt; &gt; &quot;NodeList&quot; in window; // false
&gt;
&gt; Why would that be a problem? There is nothing that says it should not.
&gt;
That&apos;s true. 

&gt; &gt; 3)
&gt; &gt; prototype property is missing from built-in functions.
&gt;
&gt; Not all of them, and ECMA 262 3rd Ed, Section 15 paragraph 9 says:-
&gt;
&gt; &quot;None of the built-in functions described in this section shall implement the
&gt; internal [[Construct]] method unless otherwise specified in the description of
&gt; a particular function. None of the built-in functions described in this section
&gt; shall initially have a prototype property unless otherwise specified in the
&gt; description of a particular function.&quot;
&gt;
You&apos;re right.


&gt;
&gt; Generally this entire &apos;bug report&apos; is bogus.

THAT is not true. This bug is valid.

document.body.childNodes IS NOT a function.


The W3C specifies NodeList,
&gt; HTMLCollection, etc., as interfaces. For ECMAScript the implications of this
&gt; are not that there should be a NodeList class in the environment but instead
&gt; that when you get an object that &quot;is a NodeList&quot; what you actually get is an
&gt; object that implements the NodeList interface (nothing more than an object that
&gt; has all of the methods and properties defined in the ECMAScript binding for the
&gt; interface), and that can be any object so long as it implements the interface
&gt; correctly. In ECMAScript/javascript functions are objects, so there is no
&gt; reason for the object implementing the NodeList interface not being a function
&gt; object. That may not be required but it certainly is not excluded, or
&gt; particularly unexpected by anyone with any experience of scripting web
&gt; browsers. Historically the typeof operator would return &apos;function&apos; for all
&gt; objects implanting NodeList, NamedNodeMap, HTMLCollection and even all pre-DOM
&gt; collections in Mac IE, Konqueror, Opera versions up 7, IceBrowser versions up
&gt; to 5 and probably at least some others. And in all cases these object were
&gt; callable.
&gt;

Do you meant objects implementing NodeList? 



document.body.childNodes does not implement NodeList. It&apos;s
constructor, however, does. 

document.body.childNodes is an instance of a NodeList.

Thanks for bringing relevant javascript knowledge here to straighten out the prototype property. You seem to have the manual clearly implanted in your brain.

&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58443</commentid>
    <comment_count>17</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-10-13 21:17:12 -0700</bug_when>
    <thetext>Please, ladies &amp; gentlemen, let&apos;s try to remain courteous in these discussions.

It&apos;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 work.)

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

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&apos;s clear that neither the ECMA-262 spec or the DOM spec require typeof to return &quot;object&quot;. It&apos;s also clear that this is not forbidden - the ECMAScript spec allows host objects to return anything whatsoever from &quot;typeof&quot;. And it&apos;s clear that returning &quot;object&quot; 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&apos;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 research.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58445</commentid>
    <comment_count>18</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2007-10-13 22:50:29 -0700</bug_when>
    <thetext>(In reply to comment #17)
&gt; Please, ladies &amp; gentlemen, let&apos;s try to remain courteous in these discussions.
&gt; 
Point taken. My post sounded sarcastic. Richard did correctly correct me on Function.prototype.prototype point, clearing up confusion that I caused. 


&gt; It&apos;s probably true that many of the issues noted by the test are not required
&gt; by the relevant specs. However, we may have to implement some of those things
&gt; for compatibility. The best thing to do with this bug report would be to split
&gt; off a separate bug for each individual issue, rather than making this a master
&gt; bug for dozens of DOM binding quirks. For each individual issue, it would be
&gt; great to know:
&gt; 
&gt; 1) Do the relevant specs require this behavior? (Probably the answer is no in
&gt; most cases, since the ECMAScript spec has pretty loose rules for host objects,
&gt; and the DOM specs are not very detailed in specifying how JS bindings should
&gt; work.)
&gt; 
document.images is not a function, it is a NodeList instance.  

&gt; 2) Do the relevant specs forbid this behavior? We&apos;re somewhat hesitant to
&gt; outright violate specs, even in cases where there might be some effect on
&gt; compatibility.
&gt; 
ECMA and W3 do not forbid any custom behavior, AFAIK.
 
&gt; 3) Is the behavior required for compatibility, or just a minor corner case?
&gt; 

Minor case, AFAIK. most uses of nodelist/collection won&apos;t try to invoke them with arguments. Please correct this if it is not right.

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

typeof it == &quot;function&quot; should mean that I can use the call method or any other methods on Function.prototype. If it&apos;s a function, I expect it to be one, completely.

Function.prototype.constructor is Function.

What is the constructor of such an object?

If typeof it == &quot;function&quot;, I expect that. 

How do you resolve document.images.length?
1) function.length
2) collection length

Implementing Function for a Collection/NodeList conflicts with NodeList interface.
Partially implementing Function makes for a confusing interface. 

It is not desirable to implement Function for document.images. Collection, not Function.

Can this feature removed? Is it being heavily relied on? 


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

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58451</commentid>
    <comment_count>19</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-10-13 23:04:45 -0700</bug_when>
    <thetext>document.images behaves as both a NodeList and a function for compatibility with Internet Explorer.  It is unlikely that this dual behaviour could be removed without causing compatibility issues with real-world websites.  See &lt;http://msdn2.microsoft.com/en-us/library/ms537461.aspx&gt; for Microsoft&apos;s documentation of their bizarre behaviour of document.images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58513</commentid>
    <comment_count>20</comment_count>
    <who name="Richard Cornford">Richard</who>
    <bug_when>2007-10-14 10:48:29 -0700</bug_when>
    <thetext>&gt; Please, ladies &amp; gentlemen, let&apos;s try to remain courteous in these
&gt; discussions.
&gt; 
&gt; It&apos;s probably true that many of the issues noted by the test are not
&gt; required by the relevant specs. However, we may have to implement
&gt; some of those things for compatibility.

By which you mean compatibility with IE, because, as I have mentioned, historically many browsers had collections that could be called and would report &apos;function&apos; when tested with - typeof -, so the status quo is already computable with all of those.

A pragmatic acceptance of the real world would tend to indicate that compatibility with IE has a lot to be said for it.

&gt; The best thing to do with
&gt; this bug report would be to split off a separate bug for each
&gt; individual issue, rather than making this a master bug for dozens
&gt; of DOM binding quirks. For each individual issue, it would be great
&gt; to know:
&gt; 
&gt; 1) Do the relevant specs require this behavior? (Probably the answer
&gt; is no in most cases, since the ECMAScript spec has pretty loose
&gt; rules for host objects, and the DOM specs are not very detailed in
&gt; specifying how JS bindings should work.)

The relevant specs nether require that a &apos;collection&apos; (taken as shorthand for NodeList, HTMLCollection, NamedNodeMap etc and anything outside DOM such as window.frames) be callable, nor do they preclude the possibility (at least in ECMAScript/javascript contexts (and Java itself is the limiting factor in the Java context, not the DOM bindings)).

These &apos;collections&apos; are all host objects so ECMA 262 allows them to report anything they like from a - typeof - operation. Though historically almost no host objects have stepped outside of the limited set of - typeof - responses defined in ECMA 262 (the only notable exceptions being methods of ActiveX objects which often report &apos;unknown&apos;). 

&gt; 2) Do the relevant specs forbid this behavior?

Nothing described in this bug report is forbidden by any pertinent specification.

&gt; We&apos;re somewhat
&gt; hesitant to outright violate specs, even in cases where there
&gt; might be some effect on compatibility.

That is not an issue here. All of:-

1. Callable collections that report &apos;object&apos; with typeof.
2. Non-callable collections that report &apos;object&apos; with typeof
3. Callable collections that report &apos;function&apos; with typoeof
4. Non-callable collections that report &apos;function&apos; with typeof

- are allowed by the pertinent specifications. Though 1 and 4 are of questionable rationality. 4 would be absolutely stupid, but it is still worth noting that when the team creating Mac IE looked at what the Windows IE team had done even they perceived option 1 as wrong and chose option 3 in its place.
 
&gt; 3) Is the behavior required for compatibility, or just a minor
&gt; corner case?

Microsoft&apos;s own documentation is littered with JScript examples which call collections, to the exclusion of using property accessors for the task. Virtually anyone coming into browser scripting via IE only scripting and Microsoft documentation will have been exposed to these bad examples.

The result will be that if you don&apos;t allow collections to be called probably about 50% of the sites that are &quot;best viewed with IE&quot; will be non-functional with Safari. The situation will be worse with &quot;IE only&quot; intranets and it may extend to .NET components.

So the question of whether the collections should be callable comes down to; do you care about that? And the pragmatic answer is probably &apos;yes&apos;.
 
&gt; In the case of the original function vs. object thing for NodeLists,
&gt; it&apos;s clear that neither the ECMA-262 spec or the DOM spec require
&gt; typeof to return &quot;object&quot;. It&apos;s also clear that this is not
&gt; forbidden - the ECMAScript spec allows host objects to return
&gt; anything whatsoever from &quot;typeof&quot;. And it&apos;s clear that returning
&gt; &quot;object&quot; matters to web compatibility.

That last is not clear. If you are aiming for &apos;like for like&apos; compatibility with Windows IE then the implications go well beyond the &apos;collections&apos;. On Windows IE all of (or at least most of) the DOM methods also report &quot;object&quot; from - typeof -, as do other callable objects such as - alert -, - setTimeout - and - attachEvent -. And perversely the - item - method of &apos;collections&apos; reports &quot;string&quot; from - typeof -, of all things (at least up to version 6. I have not checked to see if that insanity was carried through to version 7 yet). All of that is allowed, but it certainly is not a good idea and should not be reproduced lightly.

The issue here is not one of compatibility but rather one of expectations. From the first description: &quot;Javascript&apos;s type of an NodeList is &quot;function&quot;, where &quot;object&quot; is expected.&quot; But why is that expected when there is no standard that asserts that anything specific should be expected? Anyone who had any experience stretching back a couple of versions with Opera, or included Konqueror or Mac IE would have no such expectation as it would have been disappointed years ago.

It is an expectation that comes from looking at a couple of recent browsers and assuming that what they do should be definitive (despite the evidence that even recent browsers are a long way from being consistent).

The problem with pandering to such uniformed expectations is that while you can give in to the expectations of the first individual who presents them the next individual&apos;s expectations stand a very good chance of being different, and sooner or later there will be expectations that are incompatible with earlier ones.

Indeed the situation here stems from people having uniformed and incompatible expectations. The W3C DOM specifications gives a solid justification for an expected outcome from:-

document.images.item(1);

The ECMAScript bindings, by asserting that the bracket notation is to be mapped to the - item - method, justifies the same expected outcome for:-

document.image[1];

While there is nothing in the world to suggest that:-

document.images(1);

- should do anything but throw an exception, beyond Microsoft&apos;s documentation and the fact that it does not throw an exception in most actual web browsers but instead produces the same outcome as the previous two.

The only way out of that is to totally give in to creating a like-for-like imitation of one (and only one) of the browsers that are producing these expectations, and so in your case reproducing all of the features of IE, regardless of how perverse and irrational they may be (That would not be exclusive; there is no reason for not providing things that do not feature in IE at all in addition, and handling them in any why seen as desirable).

&gt; Therefore we should give a
&gt; typeof result of object. This may require objects to gain an
&gt; isFunction() method in addition to implementsCall(), which can
&gt; default to calling implementsCall() but which is overridable.

Just remember that you will have to generate a list of all of the object/function properties available in Safari and then test Windows IE to see precisely what it does return from - typeof - for its equivalents. Otherwise the problem is not solved, only moved a little more out of sight.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74404</commentid>
    <comment_count>21</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2008-03-19 00:20:45 -0700</bug_when>
    <thetext>*** Bug 10647 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105458</commentid>
    <comment_count>22</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2009-01-13 00:31:23 -0800</bug_when>
    <thetext>HTML5 now requires HTMLCollection objects to be callable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>137783</commentid>
    <comment_count>23</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-08-06 21:26:12 -0700</bug_when>
    <thetext>It seems this should be a &quot;relatively simple&quot; fix.

We can use TypeInfo like we do for Strings which masquerade as undefined.

JSValue jsTypeStringForValue(CallFrame* callFrame, JSValue v)
is the function where this check is made:

    if (v.isObject()) {
        // Return &quot;undefined&quot; for objects that should be treated
        // as null when doing comparisons.
        if (asObject(v)-&gt;structure()-&gt;typeInfo().masqueradesAsUndefined())
            return jsNontrivialString(callFrame, &quot;undefined&quot;);
        CallData callData;
        if (asObject(v)-&gt;getCallData(callData) != CallTypeNone)
            return jsNontrivialString(callFrame, &quot;function&quot;);
    }
    return jsNontrivialString(callFrame, &quot;object&quot;);

we just add a callableObject() accessor to typeInfo or some such.  And we add a special property to the IDL files.  The idls already have a CustomCall for these cases.  We can change it to be UndetectableCustomCall or something.

Sam, Oliver?  Sound like a good plan to you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181363</commentid>
    <comment_count>24</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-01-15 13:41:47 -0800</bug_when>
    <thetext>*** Bug 33716 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292035</commentid>
    <comment_count>25</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-08 20:41:51 -0700</bug_when>
    <thetext>Sadly, there does not appear to be any space left in JSC::TypeInfo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292040</commentid>
    <comment_count>26</comment_count>
      <attachid>70337</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-08 21:28:25 -0700</bug_when>
    <thetext>Created attachment 70337
approach</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292052</commentid>
    <comment_count>27</comment_count>
      <attachid>70341</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-08 22:13:07 -0700</bug_when>
    <thetext>Created attachment 70341
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292055</commentid>
    <comment_count>28</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2010-10-08 22:25:17 -0700</bug_when>
    <thetext>(In reply to comment #25)
&gt; Sadly, there does not appear to be any space left in JSC::TypeInfo.

I am not sure that is strictly true. The way TypeInfo is used in Structure, there is quite a bit of padding after it, so expanding its size should ok, though it may require some JIT changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292057</commentid>
    <comment_count>29</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-08 22:39:20 -0700</bug_when>
    <thetext>(In reply to comment #28)
&gt; (In reply to comment #25)
&gt; &gt; Sadly, there does not appear to be any space left in JSC::TypeInfo.
&gt; 
&gt; I am not sure that is strictly true. The way TypeInfo is used in Structure, there is quite a bit of padding after it, so expanding its size should ok, though it may require some JIT changes.

Do you think that&apos;s better than the approach in this patch?  I tried changing the field from a char to a short, but then I ran into some ASSERTs about the inline capacity of objects.  Given that the typeof operator isn&apos;t called that often, it seemed better to add a virtual function call than to add a byte to the structure, but I&apos;m not nearly an expert on the tradeoffs here.  (Part of the fun of working on these ancient bugs is to learn about this kind of thing.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292060</commentid>
    <comment_count>30</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2010-10-08 23:20:15 -0700</bug_when>
    <thetext>(wincing at my previous comments)

ECMA 5 requires callable host object to result &quot;function&quot; when supplied to typeof operator. And so if document.images is remain callable then typeof document.images is required to result &quot;function&quot;.

See also comment 20.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292069</commentid>
    <comment_count>31</comment_count>
      <attachid>70341</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-09 00:49:45 -0700</bug_when>
    <thetext>Comment on attachment 70341
Patch

Eric, Adam, Sam - I don&apos;t understand why everyone is discussing how to fix this. Isn&apos;t the bug clearly INVALID at this point?

r-, because there is no explanation of why this is even being changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292110</commentid>
    <comment_count>32</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-09 08:17:20 -0700</bug_when>
    <thetext>&gt; Eric, Adam, Sam - I don&apos;t understand why everyone is discussing how to fix this. Isn&apos;t the bug clearly INVALID at this point?

4 of 5 browsers agree that the typeof these objects is &quot;object&quot;.

&gt; ECMA 5 requires callable host object to result &quot;function&quot; when supplied to typeof operator. And so if document.images is remain callable then typeof document.images is required to result &quot;function&quot;.

Then the spec is wrong and should be fixed.  The folks in the working group must not have considered this case because their operating rule was that if 4 of 5 browsers agree, then that&apos;s what the spec should say.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292113</commentid>
    <comment_count>33</comment_count>
      <attachid>70341</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-09 08:18:10 -0700</bug_when>
    <thetext>Comment on attachment 70341
Patch

IMHO, Safari being the only browser that fails this test is a good reason to converge to the consensus behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292159</commentid>
    <comment_count>34</comment_count>
      <attachid>70341</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-09 12:35:43 -0700</bug_when>
    <thetext>Comment on attachment 70341
Patch

Please bring this up for discussion on relevant working groups.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292241</commentid>
    <comment_count>35</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-09 19:44:31 -0700</bug_when>
    <thetext>&gt; Please bring this up for discussion on relevant working groups.

That seems overly conservative.  Why wouldn&apos;t we want to match every other browser?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292247</commentid>
    <comment_count>36</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-10-09 20:59:19 -0700</bug_when>
    <thetext>It doesn&apos;t seem that there is any urgency now - we lived with this behavior before, why rush to change it when all the specs reportedly agree with us?

ECMAScript is a complicated spec with many interdependencies. If we&apos;re going to violate a requirement saying that typeof of a callable object must be &quot;function&quot;, we should at least consult experts who can tell us what else needs to change in accordance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292262</commentid>
    <comment_count>37</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-09 23:46:32 -0700</bug_when>
    <thetext>@oliver: Thoughts on what we should do here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292513</commentid>
    <comment_count>38</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-10-11 10:00:22 -0700</bug_when>
    <thetext>With my TC39 hat on...

The ES5 spec is clear (11.4.3) that any object that has a [[Call]] should return &quot;function&quot; for typeof.

The problem comes from our willingness to follow the IE VBS-ism where collections are callable.

In ES3 this was fine since ES3 did not mandate that [[Call]] implied typeof obj === &quot;function&quot;.

I think there are 2 possible paths here.

1. Make collections non callable, at least not in standards mode. Other browsers do not do this (IE9 stoppee supporting it).
2. Keep them callable but hack typeof to return &quot;object&quot; like this patch does. This is no worse than the document.all hack and just like that one this is a win for compatibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292537</commentid>
    <comment_count>39</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-11 10:24:41 -0700</bug_when>
    <thetext>&gt; 1. Make collections non callable, at least not in standards mode. Other browsers do not do this (IE9 stopped supporting it).

Oh, I didn&apos;t know IE9 stopped making these callable.  Unfortunately, IE9 has tons of compatibility modes, which makes it difficult to know whether following suit will work for us.  I suspect it would cost noticeable compatibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292577</commentid>
    <comment_count>40</comment_count>
    <who name="Oliver Hunt">oliver</who>
    <bug_when>2010-10-11 11:28:07 -0700</bug_when>
    <thetext>I would rather not jump through hoops to make things that are callable claim not to be functions, as it would seem likely to lead to interesting bugs.  For instance JSON serialisation skips &apos;functions&apos; it does this by skipping things that are callable, yet this means it would need to be updated to check for these special cases, ditto for postMessage serialisation.  Special casing these so that typeof returns &quot;object&quot; would lead (i think) to many subtle differences in behaviour.

If we want to stop these from claiming to be &quot;function&quot;s they should stop being callable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292588</commentid>
    <comment_count>41</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-11 11:44:07 -0700</bug_when>
    <thetext>&gt; I would rather not jump through hoops to make things that are callable claim not to be functions, as it would seem likely to lead to interesting bugs.  For instance JSON serialisation skips &apos;functions&apos; it does this by skipping things that are callable, yet this means it would need to be updated to check for these special cases, ditto for postMessage serialisation.  Special casing these so that typeof returns &quot;object&quot; would lead (i think) to many subtle differences in behaviour.

How do these cases interoperate across browsers now?  It seems that we&apos;ll need to make sure these cases behave properly regardless of what string we return from this function.

&gt; If we want to stop these from claiming to be &quot;function&quot;s they should stop being callable.

I suspect we&apos;ll have compatibility problems removing their callability.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292610</commentid>
    <comment_count>42</comment_count>
    <who name="Garrett Smith">xk1t</who>
    <bug_when>2010-10-11 12:20:20 -0700</bug_when>
    <thetext>(In reply to comment #38)
&gt; With my TC39 hat on...
&gt; 
&gt; The ES5 spec is clear (11.4.3) that any object that has a [[Call]] should return &quot;function&quot; for typeof.
&gt; 
&gt; The problem comes from our willingness to follow the IE VBS-ism where collections are callable.
&gt; 
&gt; In ES3 this was fine since ES3 did not mandate that [[Call]] implied typeof obj === &quot;function&quot;.
&gt; 
&gt; I think there are 2 possible paths here.
&gt; 
&gt; 1. Make collections non callable, at least not in standards mode. Other browsers do not do this (IE9 stoppee supporting it).

That&apos;s a fair proposal, though you&apos;ve supported it with false information :-(.

In Gecko, collections aren&apos;t callable in any mode. Never have been. If collections aren&apos;t callable in Gecko then all of those pages are erring in Gecko. How many pages that is might be hard to determine because many &quot;IE only&quot; sites are internal applications. Probably Mozilla developers would have more insight into this (Boris comes to mind).

Collections are callable in Opera 10.6 (both modes) and in the IE9 beta I have, version 9.0.7390 (all modes).
&gt;&gt;typeof document.images(0)
&quot;object&quot;
&gt;&gt;clientInformation
[object Navigator] {
	appCodeName : &quot;Mozilla&quot;,
	appMinorVersion : &quot;beta&quot;,
	browserLanguage : &quot;en-us&quot;,
	cookieEnabled : true,
	cpuClass : &quot;x86&quot;,
	mimeTypes : [object MSMimeTypesCollection],
	plugins : [object MSPluginsCollection],
	systemLanguage : &quot;en-us&quot;,
	userLanguage : &quot;en-us&quot;,
	appName : &quot;Microsoft Internet Explorer&quot;
	...
}
&gt;&gt;document.documentMode
9
&gt;&gt;typeof document.images
&quot;object&quot;
:-(

&gt; 2. Keep them callable but hack typeof to return &quot;object&quot; like this patch does. This is no worse than the document.all hack and just like that one this is a win for compatibility.

Another spec violation. That weakens the spec and causes interoperability problems for other violations that don&apos;t follow your cowpath (which was originally IE&apos;s cowpath). I suggest instead that you propose such language extensions to es-discuss.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292615</commentid>
    <comment_count>43</comment_count>
    <who name="Erik Arvidsson">arv</who>
    <bug_when>2010-10-11 12:36:08 -0700</bug_when>
    <thetext>(In reply to comment #42)
&gt; (In reply to comment #38)
&gt; Collections are callable in Opera 10.6 (both modes) and in the IE9 beta I have, version 9.0.7390 (all modes).
&gt; &gt;&gt;typeof document.images(0)
&gt; &quot;object&quot;

I did try this but my page had no images in it which causes a &quot;Member not found&quot; error. It was a bad test. I apologize for giving false hope.

typeof collection === &apos;function&apos; is a hazard since these collections are not behaving like functions. The do not have the right [[Class]], instanceof function is false, there is no bind but more serious is the lack of call and apply.

I&apos;m sorry for making this discussion even less on topic than it already is. It is clear that the WebKit/JSC bindings are the exception amongst the browsers and that this is causing compatibility issues.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292627</commentid>
    <comment_count>44</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2010-10-11 13:18:55 -0700</bug_when>
    <thetext>I don&apos;t think a new virtual function -- &quot;hasFunctionType()&quot; -- for asking an object about its callability, in addition to the existing virtual function -- &quot;getCallData()&quot; -- is the best solution. When the two disagree, how do I know which one is right?

I think a better solution is to add a bit to the CallType returned by getCallData, which specifies the behavior of typeof.

I say &quot;I think&quot; because I&apos;m not sure what behavior we&apos;re ultimately trying to implement. Are we just trying to bludgeon typeof into matching the behavior of other browsers for a fixed set of DOM objects? If so, that&apos;s probably the right solution.

But maybe we&apos;re trying to implement a different rule -- for example, that only objects that are callable and descendants of the original value of Function.prototype return &quot;function&quot; to typeof. In that case, a completely different solution is appropriate.

Adam, (In reply to comment #35)
&gt; &gt; Please bring this up for discussion on relevant working groups.
&gt; 
&gt; That seems overly conservative.  Why wouldn&apos;t we want to match every other browser?

Since we need to know what behavior we&apos;re trying to implement in order to judge whether the code communicates that behavior well, and whether it&apos;s fully tested, I think the best way forward is to discuss this with the relevant working groups and decide on a behavior.

I think my comments above are a reason to use a different approach than the one you&apos;ve used, and to require a certain set of test cases, but I&apos;m just not sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292639</commentid>
    <comment_count>45</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2010-10-11 13:58:37 -0700</bug_when>
    <thetext>&gt; I think a better solution is to add a bit to the CallType returned by getCallData, which specifies the behavior of typeof.

Ok.  That seems to have further reaching implications, but I can study them and see what the consequences would be.

&gt; I say &quot;I think&quot; because I&apos;m not sure what behavior we&apos;re ultimately trying to implement. Are we just trying to bludgeon typeof into matching the behavior of other browsers for a fixed set of DOM objects? If so, that&apos;s probably the right solution.

I believe bludgeon is a very appropriate verb here.  :)

&gt; But maybe we&apos;re trying to implement a different rule -- for example, that only objects that are callable and descendants of the original value of Function.prototype return &quot;function&quot; to typeof. In that case, a completely different solution is appropriate.

I don&apos;t believe that&apos;s the behavior we want.  For example, just because you mutate an object&apos;s prototype chain doesn&apos;t mean it&apos;s typeof behavior should change.  We could test other browsers to see, but I think this behavior is something specific for these host objects.

&gt; Adam, (In reply to comment #35)
&gt; &gt; &gt; Please bring this up for discussion on relevant working groups.
&gt; &gt; 
&gt; &gt; That seems overly conservative.  Why wouldn&apos;t we want to match every other browser?
&gt; 
&gt; Since we need to know what behavior we&apos;re trying to implement in order to judge whether the code communicates that behavior well, and whether it&apos;s fully tested, I think the best way forward is to discuss this with the relevant working groups and decide on a behavior.

I didn&apos;t understand this comment.

&gt; I think my comments above are a reason to use a different approach than the one you&apos;ve used, and to require a certain set of test cases, but I&apos;m just not sure.

There are two threads to this discussion:

1) What observable behavior do we want?
2) How should we implement that behavior?

It sounds like you agree that our observable behavior should match other browsers and that your comments are more directed at the second question.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>293486</commentid>
    <comment_count>46</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2010-10-13 10:20:33 -0700</bug_when>
    <thetext>&gt; There are two threads to this discussion:
&gt; 
&gt; 1) What observable behavior do we want?
&gt; 2) How should we implement that behavior?

I think the questions are linked. A good implementation depends on a good definition of the desired behavior.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1004881</commentid>
    <comment_count>47</comment_count>
    <who name="Michał Gołębiowski-Owczarek">m.goleb+bugzilla</who>
    <bug_when>2014-04-29 01:53:15 -0700</bug_when>
    <thetext>Both Safari &amp; WebKit nightly have:
typeof document.body.childNodes === &apos;object&apos;

Therefore, the bug as reported is no longer present.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1875899</commentid>
    <comment_count>48</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-06-14 15:40:46 -0700</bug_when>
    <thetext>Using Wayback Archive, I tested &quot;DHTML&quot; test case and now all browsers (Firefox Nightly 103, Chrome Canary 105 and Safari 15.5) aligns and give same output.

Link - https://web.archive.org/web/20101207041718/http://dhtmlkitchen.com/jstest/isFunctionTest.html

Can we close this bug based on all browser behave same now. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>70337</attachid>
            <date>2010-10-08 21:28:25 -0700</date>
            <delta_ts>2010-10-08 22:13:03 -0700</delta_ts>
            <desc>approach</desc>
            <filename>bug-14547-20101008212824.patch</filename>
            <type>text/plain</type>
            <size>8028</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0phdmFTY3JpcHRDb3JlLmV4cAo9PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBK
YXZhU2NyaXB0Q29yZS9KYXZhU2NyaXB0Q29yZS5leHAJKHJldmlzaW9uIDY5NDE4KQorKysgSmF2
YVNjcmlwdENvcmUvSmF2YVNjcmlwdENvcmUuZXhwCSh3b3JraW5nIGNvcHkpCkBAIC0yMjUsNiAr
MjI1LDcgQEAgX19aTjNKU0M2SlNDZWxsMTFnZXRDYWxsRGF0YUVSTlNfOENhbGxEYQogX19aTjNK
U0M2SlNDZWxsMTFnZXRKU051bWJlckV2CiBfX1pOM0pTQzZKU0NlbGwxNGRlbGV0ZVByb3BlcnR5
RVBOU185RXhlY1N0YXRlRVJLTlNfMTBJZGVudGlmaWVyRQogX19aTjNKU0M2SlNDZWxsMTRkZWxl
dGVQcm9wZXJ0eUVQTlNfOUV4ZWNTdGF0ZUVqCitfX1pOM0pTQzZKU0NlbGwxNWhhc0Z1bmN0aW9u
VHlwZUV2CiBfX1pOM0pTQzZKU0NlbGwxNmdldENvbnN0cnVjdERhdGFFUk5TXzEzQ29uc3RydWN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ydHkgZnVuY3Rpb24KICAg
ICBwdXNoKEBoZWFkZXJDb250ZW50LCAiICAgIHZpcnR1YWwgYm9vbCBkZWxldGVQcm9wZXJ0eShK
U0M6OkV4ZWNTdGF0ZSosIGNvbnN0IEpTQzo6SWRlbnRpZmllciYpO1xuIikgaWYgJGRhdGFOb2Rl
LT5leHRlbmRlZEF0dHJpYnV0ZXMtPnsiQ3VzdG9tRGVsZXRlUHJvcGVydHkifTsK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>70341</attachid>
            <date>2010-10-08 22:13:07 -0700</date>
            <delta_ts>2010-10-09 12:35:43 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-14547-20101008221306.patch</filename>
            <type>text/plain</type>
            <size>13749</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IEphdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBKYXZhU2NyaXB0
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDY5NDQwKQorKysgSmF2YVNjcmlwdENvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMjMgQEAKKzIwMTAtMTAtMDggIEFkYW0gQmFy
dGggIDxhYmFydGhAd2Via2l0Lm9yZz4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9P
UFMhKS4KKworICAgICAgICB0eXBlb2YgZG9jdW1lbnQuYm9keS5jaGlsZE5vZGVzPT0iZnVuY3Rp
b24iICgib2JqZWN0IiBleHBlY3RlZCkKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcv
c2hvd19idWcuY2dpP2lkPTE0NTQ3CisKKyAgICAgICAgVGhpcyBwYXRjaCBhZGRzIGEgdmlydHVh
bCBmdW5jdGlvbi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RlZ2Vy
IHZhbHVlcy4KSW5kZXg6IEphdmFTY3JpcHRDb3JlL3J1bnRpbWUvT3BlcmF0aW9ucy5jcHAKPT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PQotLS0gSmF2YVNjcmlwdENvcmUvcnVudGltZS9PcGVyYXRpb25zLmNwcAkocmV2aXNp
b24gNjk0MTgpCisrKyBKYXZhU2NyaXB0Q29yZS9ydW50aW1lL09wZXJhdGlvbnMuY3BwCSh3b3Jr
aW5nIGNvcHkpCkBAIC03Myw4ICs3Myw3IEBAIEpTVmFsdWUganNUeXBlU3RyaW5nRm9yVmFsdWUo
Q2FsbEZyYW1lKiAKICAgICAgICAgLy8gYXMgbnVsbCB3aGVuIGRvaW5nIGNvbXBhcmlzb25zLgog
ICAgICAgICBpZiAoYXNPYmplY3QodiktPnN0cnVjdHVyZSgpLT50eXBlSW5mbygpLm1hc3F1ZXJh
ZGVzQXNVbmRlZmluZWQoKSkKICAgICAgICAgICAgIHJldHVybiBqc05vbnRyaXZpYWxTdHJpbmco
Y2FsbEZyYW1lLCAidW5kZWZpbmVkIik7Ci0gICAgICAgIENhbGxEYXRhIGNhbGxEYXRhOwotICAg
ICAgICBpZiAoYXNPYmplY3QodiktPmdldENhbGxEYXRhKGNhbGxEYXRhKSAhPSBDYWxsVHlwZU5v
bmUpCisgICAgICAgIGlmIChhc09iamVjdCh2KS0+aGFzRnVuY3Rpb25UeXBlKCkpCiAgICAgICAg
ICAgICByZXR1cm4ganNOb250cml2aWFsU3RyaW5nKGNhbGxGcmFtZSwgImZ1bmN0aW9uIik7CiAg
ICAgfQogICAgIHJldHVybiBqc05vbnRyaXZpYWxTdHJpbmcoY2FsbEZyYW1lLCAib2JqZWN0Iik7
CkluZGV4OiBXZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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ICAgIAotICAgIHNob3VsZEJlKCJ0eXBlb2YocGx1Z2lu
V2l0aEludm9rZURlZmF1bHQpIiwgIidmdW5jdGlvbiciKTsKKyAgICBzaG91bGRCZSgidHlwZW9m
KHBsdWdpbldpdGhJbnZva2VEZWZhdWx0KSIsICInb2JqZWN0JyIpOwogICAgIHNob3VsZEJlKCJw
bHVnaW5XaXRoSW52b2tlRGVmYXVsdCgpIiwgIjEiKQogCiAgICAgcGx1Z2luV2l0aG91dEludm9r
ZURlZmF1bHQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgncGx1Z2luLXdpdGhvdXQtaW52b2tl
LWRlZmF1bHQnKTsK
</data>
<flag name="review"
          id="60173"
          type_id="1"
          status="-"
          setter="ap"
    />
    <flag name="commit-queue"
          id="60174"
          type_id="3"
          status="-"
          setter="ap"
    />
          </attachment>
      

    </bug>

</bugzilla>