1
votes

What is the difference (if any) between a standard document object and an extjs object? I mean this: Is there a difference between

<input type = "button"> 

and new Ext.Button()

1

1 Answers

2
votes

Yes, there's a difference. The HTML <input> element creates a node in the document's DOM tree, which is accessible in JavaScript using DOM methods. The Ext.Button() constructor creates an ordinary JavaScript object, not a DOM object, but it knows how to create the DOM object when ExtJS asks it to render itself.

Basically, ExtJS components are wrappers around (possibly multiple) DOM objects, and have a higher-level API compared to working with the DOM tree directly.