diff --git a/AUTHORS b/AUTHORS index 95f0be3..ed7cc51 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,7 @@ Chris Cinelli Daniel Bonniot de Ruisselet Deepak Denis Sablic +Duan Yao filodej hasufell Herbert Jones diff --git a/share/pdf2htmlEX.js.in b/share/pdf2htmlEX.js.in index 25352fe..f21d3df 100644 --- a/share/pdf2htmlEX.js.in +++ b/share/pdf2htmlEX.js.in @@ -372,9 +372,8 @@ Viewer.prototype = { var _idx = idx; var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); - xhr.onreadystatechange = function(){ - if (xhr.readyState != 4) return; - if (xhr.status === 200) { + xhr.onload = function(){ + if (xhr.status === 200 || xhr.status === 0) { // find the page element in the data var div = document.createElement('div'); div.innerHTML = xhr.responseText;