dymo-connect-framework
dymo-connect-framework copied to clipboard
Synchronous XMLHttpRequest on the main thread is deprecated
Can you fix this issue? This was brought over from the older library.
The issue is in ajaxSync using archaic methods to fetch remote data. This causes the browser to hang/freeze during this process.
When using the dymo.label.framework.init()
the page would hang for +- 6 seconds when the local service is not installed. I wrote something dirty to check if the service is running.
function initiateDymo(host) { for(var i = 41951; i <= 41960; i++) { (function(i) { setTimeout(function(port) { $.ajax({ url : 'https://' + host + ':' + port + '/DYMO/DLS/Printing/StatusConnected', timeout: 300, dataType : 'json', success : function(data, textStatus) { // your code }, error : function(e,a) { // your code } }); }, 1, i) })(i) } }