mankz
26 Oct 2012, 1:40 AM
The contract of Ext.get is to 'get' an element from the DOM. Seems broken to me:
Ext.getBody().setHtml('<div id="foo">CRAP</div>');
console.log(Ext.get('foo').dom.innerHTML); >>"CRAP"
Ext.getBody().setHtml('<div id="foo">AWESOME</div>');
console.log(Ext.get('foo').dom.innerHTML) // >> "CRAP"
Cache is not busted as I overwrite some element. Docs say this should work.
http://docs.sencha.com/touch/2-0/#!/api/Ext-method-get
Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.
Ext.getBody().setHtml('<div id="foo">CRAP</div>');
console.log(Ext.get('foo').dom.innerHTML); >>"CRAP"
Ext.getBody().setHtml('<div id="foo">AWESOME</div>');
console.log(Ext.get('foo').dom.innerHTML) // >> "CRAP"
Cache is not busted as I overwrite some element. Docs say this should work.
http://docs.sencha.com/touch/2-0/#!/api/Ext-method-get
Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.