Custom Widget - Compilation causes error in mxui.js

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check mxui.js:21 SyntaxError: Unexpected token ( at eval (eval at <anonymous> (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:3521), <anonymous>:1:22) at Function.req.eval (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:3598) at _90 (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:14675) at _f5 (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:15614) at Function.req.getText (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:3400) at _33 (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:16199) at _9 (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:328) at http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:7141 at _38 (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:13512) at _7b (http://localhost:8080/mxclientsystem/mxui/mxui.js?635717928827573765:21:7126)_4a4 @ mxui.js:21 My widget causes the error above to occur, my JSlint doesn't give any javascript errors for the widget's code. I'm using the boilerplate for widgets, so my question is: "Does anyone have any suggestions on where to start debugging this?"
1 answers

Are you using XMLHttpRequest directly instead of the Mendix API functions to communicate with the Mendix runtime? Also for doing Ajax requests always use either DOJO functions, JQuery functions or preferably if the actions are for executing microflows or xpath data retrievals use the Mendix api.

That should solve this error. Using the XMLHttpRequest functions isn't wrong javascript therefore JSLint won't complain. But using the function directly is considered unwanted by the MX api. The first line says it all. the rest is jibbirish that will confuse anyone :)