I was looking into adding a window.onerror handler in my javascript to log errors into my database. Everything was working fine until I added an HTMLX tree. I found that the js files are overriding my declared onerror handler and using the one that is defined somewhere in the js files.
Is there a way to turn off the error handling? I feel like this error handling within dhtmlx should be using try/catch blocks and not catching all errors from the window.
So far I’ve narrowed down the possible js files to dhtmlxcommon.js and dhtmlxtree_er.js
Yes, dhtmlxtree_er.js extension can redefine window.onerror handler that you set before. So, you should not do not use this library if you have set custom event handlers.
If you want to catch XML loading error, you may use the following approach