From 300c3ff528b9346d35681b43d095913636b6fd12 Mon Sep 17 00:00:00 2001 From: Hans Christian Reinl Date: Sun, 4 Oct 2015 21:17:28 +0200 Subject: [PATCH] Fix demo loading in IE8 Ref. #186 --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 69dc2fd..08785db 100644 --- a/index.html +++ b/index.html @@ -73,13 +73,13 @@

Examples

var i = 0; var get = function (url, callback) { - var onload = function () { - callback(this.responseText); - }; var request = new XMLHttpRequest(); - - request.onload = onload; - request.open("get", url, true); + request.open('GET', url, true); + request.onreadystatechange = function () { + if (this.readyState === 4 && this.status === 200){ + callback(this.responseText); + } + }; request.send(); };