PDA

View Full Version : [SOLVED] Some questions to Ext Class



msinn
17 Jan 2011, 5:47 AM
Hi,

I have some questions to the Ext Class. I hope somebody will be kind to help me.

1. Is there a difference between DOM Node and HTMLElement Node?

2. Ext.select - What is the difference between CompositeElementLite and CompositeElement?

3. Where are defined Types such as: NodeList, IXMLNodeList, HTMLCollection,

4. Why is the logical operator NOT used twice: !!V ?


isObject : function(v){
return !!v && Object.prototype.toString.call(v) === '[object Object]';
},

Condor
17 Jan 2011, 6:03 AM
1. Almost the same thing. "DOM Node" refers to a any node in the DOM. HTMLElement is the baseclass of any node in the DOM.

2. CompositeElement contains separate Ext.Element instances for every node, CompositeElementLite only contains a single Ext.Element that is reused for every node (see Ext.Element.Flyweight).

3. Most of them in the W3C DOM specification (http://www.w3.org/TR/REC-DOM-Level-1/). IXMLNodeList is documented by Microsoft (http://msdn.microsoft.com/en-us/library/ms751305(v=vs.85).aspx).

4. Using !! is a short method to convert an expression to boolean (typeof !!v == 'boolean').

msinn
17 Jan 2011, 6:43 AM
Thank you Condor! Have a nice day!