Simple and working solution.
ThisĀ code snippet will help you to destroy all dojo widgets.
window.widgetsDestroy = function(){ require(['dijit/registry','dojo/query'],function(registry,query){ query('*[id]').forEach(function(node){ var widget = registry.byId(node.id); if(undefined !== widget){ widget.destroy(); } }); }); }
Use it with :
window.widgetsDestroy();
Suggestions or problems ?
Write a comment.
Alexandre wrote:
Man, you save my life!
Thanks from brazil @ Dec / 2016
Link | December 28th, 2016 at 14:38