Confirming for document.applets[n], and true of document.embeds[n] as well. typeof returns function, but the member itself is an HTMLAppletElement (or HTMLEmbedElement) object. Same thing with document.getElementById(objID), typeof returns "function" but it appears to be the appropriate HTMLElement. -->Core
I'm not sure the plugin components is right, but the plugin interfaces did change in the regression timeframe and may have affected this.
XPC_WN_WithCall object ops are confusing JS_TypeOfObject (see the third clause in the ternary operator in the unhappy if statement). Should we be testing OBJ_IS_NATIVE instead of a direct test against map->ops and js_ObjectOps? Tentatively moving this to JS Engine.
*** Bug 296858 has been marked as a duplicate of this bug. ***
*** Bug 346789 has been marked as a duplicate of this bug. ***
The same goes for "object" nodes. var x = document.createElement("object"); typeof x; -- "function"
Blake, can you take this and fix it fast? /be
This really is a JS engine issue, no? These objects have a [[Call]]. That's the only part where XPConnect is involved, and that part is correct. The rest is all js-land...
Why are we blocking 4.0 beta 7 on a six year old bug?
>This really is a JS engine issue, no? These objects have a [[Call]]. That's >the only part where XPConnect is involved, and that part is correct. The rest >is all js-land... I am not familiar with DOM related stuff, but when these element have a [[Call]] method, ES5 wants us to say "function". If the [[Call]] method is not intentional it's probably a DOM bug.
The [[Call]] is very intentional on the DOM side: these are callable objects.
I think this bug is invalid these object have a [[Call]] internal method and ES5 11.4.3 explicitly say "Object (native or _host_ and does implement [[Call]])" => "function".
As someone just now hitting this issue and trying to make sense of the history for this ticket resolution, why on earth are Embed/Object elements callable in the first place?
That's an excellent question. As far as anyone can tell, because some plug-ins do something when you call them and no one wants to break that for compat reasons... But maybe we should break it after all.