Browse files

Might as well have the debugger page try and support IE

  • Loading branch information...
1 parent 8e4a8cc commit f023e8cf1aaf16574ac4a91926a24facddc97fee @sdesai sdesai committed Sep 23, 2011
Showing with 17 additions and 6 deletions.
  1. +17 −6 tools/cssmin-debugger.html
View
23 tools/cssmin-debugger.html
@@ -48,14 +48,19 @@ <h1 id="notsupportedmsg" class="hidden">Your browser does not support the local
<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 @@ <h1 id="notsupportedmsg" class="hidden">Your browser does not support the local
};
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.