• How to destroy all dojo widget nodes

    November 26, 2012

    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.


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /home/c2kblate/sites/ivangospodinow.com/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048
 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org