Working with the DOM

Ext JS provides an easy way to deal with the DOM. We can create nodes, change styles, add listeners, and create beautiful animations, among other things without worrying about the browser's implementations. Ext JS provides us with a cross-browser compatibility API that will make our lives easier.

The responsible class for dealing with the DOM nodes is the Ext.Element class. This class is a wrapper for the native nodes and provides us with many methods and utilities to manipulate the nodes.

Note

Manipulating DOM directly is considered bad practice and none of the DOM markup should be placed in the index file. This example exists only for illustrative purposes.

Getting elements

The Ext.get method let us retrieve a DOM element encapsulated ...

Get Learning Ext JS - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.