Mark xhr.status=0 as successful

edit
Sergey Gospodarets 2014-04-02 12:59:36 +03:00
parent 9da952fea3
commit 75247a8860
1 changed files with 4 additions and 1 deletions

View File

@ -219,7 +219,10 @@
xhr.onreadystatechange = function() {
if( xhr.readyState === 4 ) {
if ( xhr.status >= 200 && xhr.status < 300 ) {
if (
(xhr.status >= 200 && xhr.status < 300) ||
xhr.status === 0 // file protocol yields status code 0 (useful for local debug, mobile applications etc.)
) {
section.outerHTML = slidify( xhr.responseText, {
separator: section.getAttribute( 'data-separator' ),