Permalink
Browse files

Might as well have the debugger page try and support IE

  • Loading branch information...
sdesai committed Sep 23, 2011
1 parent 8e4a8cc commit f023e8cf1aaf16574ac4a91926a24facddc97fee
Showing with 17 additions and 6 deletions.
  1. +17 −6 tools/cssmin-debugger.html
@@ -48,14 +48,19 @@ <h2>Original</h2>
<script>
(function() {
var dumpContents = function(node, str) {
node.innerHTML = "";
node.appendChild(document.createTextNode(str));
};
},
testFile,
changeHandler;
if (window.File && window.FileReader) {
document.getElementById('testFile').addEventListener('change', function(e) {
testFile = document.getElementById('testFile');
changeHandler = function(e) {
var file = this.files[0],
fr = new FileReader(),
input = document.getElementById("in"),
@@ -69,8 +74,14 @@ <h2>Original</h2>
};
fr.readAsText(file, "utf-8");
}, false);
}
if (testFile.addEventListener) {
testFile.addEventListener('change', changeHandler, false);
} else {
testFile.attachEvent('onChange', changeHandler);
}
} else {
document.getElementById("notsupportedmsg").removeClass("hidden");
}

0 comments on commit f023e8c

Please sign in to comment.