Skip to content

Commit

Permalink
Might as well have the debugger page try and support IE
Browse files Browse the repository at this point in the history
  • Loading branch information
sdesai committed Sep 23, 2011
1 parent 8e4a8cc commit f023e8c
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions tools/cssmin-debugger.html
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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");
}
Expand Down

0 comments on commit f023e8c

Please sign in to comment.