Imagine the following case, where I have the following HTML document:
<html>
<head>... include all the js and css here...</head>
<body>
<div class="placeholderForExtPanel"></div>
</body>
</html>
Now somewhere in my code, I tell ExtJS to render a panel in my placeholder.
var container = Ext.select('.placeholderForExtPanel');
Ext.create('Ext.form.Panel', {
title: 'My Panel'
});
A bit later, some other part of the code decides to remove the placeholder div from the DOM.
Ext.select('.placeholderForExtPanel').first().remove();
In this case, what happens to the Panel that was declared before? Do I need to manually destroy it, or does ExtJS know that it's containing element was just removed from the DOM and it should destroy the Panel by itself? I'm using ExtJS 4.1.