liorean wrote:
Is this the reason for:
var
div=document.createElement('div'),
span=document.createElement('span'),
text=document.createTextNode('What am I?');
Function.prototype.call.call(div.appendChild,span,text);
text.data+='\r\n'+text.parentNode.tagName;
faili
Cameron McCormack wrote:
I wondered that myself, but it would help the case where script authors
want to mess about with the prototypes of various objects. Perhaps it
doesn’t need to be specified exactly, but with enough fixed down such
that you could reliably assign to HTMLElement.prototype.ap
Maciej Stachowiak wrote:
I'm not even sure if it's intentional that global constructors in Mozilla have a
function-valued property named "QueryInterface", or just an
implementation artifact.
It's an implementation artifact.
-Boris
liorean:
> (The ECMAScript built-in constructors all follow the pattern of having
> [[Call]], so their [[Class]] is "Function" instead and their
> [[Prototype]] is the initial Function.prototype. The DOM constructors
> don't have [[Call]] so their [[Class]] should be "Object" instead. Or
> some
Cameron McCormack:
> > NodeList = { an object }
> > NodeList.[[Prototype]] = Object prototype object
> > NodeList.prototype = { an object }
> > NodeList.prototype.[[Prototype]] = Object prototype object
> > NodeList.prototype.constructor = NodeList
> > NodeList.prototype.someFunction = { som
Cameron McCormack wrote:
> This is probably not what browsers do in practice, though. For example,
> Opera 9 has an addEventListener method directly on the Node interface
> prototype object
On 06/06/07, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
What Gecko does is to put all properties for al
On 06/06/07, Cameron McCormack <[EMAIL PROTECTED]> wrote:
What should the prototype chain for an object that implements multiple
interfaces looks like? A single interface is simple enough:
NodeList = { an object }
NodeList.[[Prototype]] = Object prototype object
NodeList.prototype = { an
On Jun 5, 2007, at 10:52 PM, Ian Hickson wrote:
On Wed, 6 Jun 2007, Boris Zbarsky wrote:
To be honest, do we really think that specifying the exact prototype
chain is desirable? How likely are UAs to rework the mappings
between
their native code and ECMAScript to follow said spec?
Saf
On Jun 5, 2007, at 10:15 PM, Boris Zbarsky wrote:
Cameron McCormack wrote:
This is probably not what browsers do in practice, though. For
example,
Opera 9 has an addEventListener method directly on the Node interface
prototype object
What Gecko does is to put all properties for all the
On Wed, 6 Jun 2007, Boris Zbarsky wrote:
>
> To be honest, do we really think that specifying the exact prototype
> chain is desirable? How likely are UAs to rework the mappings between
> their native code and ECMAScript to follow said spec?
Safari has had to implement this stuff in a Mozilla
Boris Zbarsky:
> As a result, given a object (call it "div"),
>
> div.[[Prototype]] === HTMLDivElement.prototype
> HTMLDivElement.prototype.[[Prototype]] === HTMLElement.prototype
> div.appendChild === HTMLDivElement.prototype.appendChild
>
> are all true, while
>
> div.appendChild ===
Cameron McCormack wrote:
This is probably not what browsers do in practice, though. For example,
Opera 9 has an addEventListener method directly on the Node interface
prototype object
What Gecko does is to put all properties for all the interfaces an object
implements onto the "closest" prot
Cameron McCormack:
> The same question could apply to multiple inheritance (which is allowed
> by OMG IDL, but AFAIK is not used in any of the DOM specs).
As Ian reminds me, SVG uses multiple inheritance extensively.
--
Cameron McCormack, http://mcc.id.au/
xmpp:[EMAIL PROTECTED] ▪ ICQ
Hi everyone.
What should the prototype chain for an object that implements multiple
interfaces looks like? A single interface is simple enough:
NodeList = { an object }
NodeList.[[Prototype]] = Object prototype object
NodeList.prototype = { an object }
NodeList.prototype.[[Prototype]] =
14 matches
Mail list logo