Skip to content
This repository
Browse code

Might as well have the debugger page try and support IE

  • Loading branch information...
commit f023e8cf1aaf16574ac4a91926a24facddc97fee 1 parent 8e4a8cc
Satyen Desai authored

Showing 1 changed file with 17 additions and 6 deletions. Show diff stats Hide diff stats

  1. +17 6 tools/cssmin-debugger.html
23 tools/cssmin-debugger.html
@@ -48,14 +48,19 @@ <h1 id="notsupportedmsg" class="hidden">Your browser does not support the local
48 48
49 49 <script>
50 50 (function() {
51   -
  51 +
52 52 var dumpContents = function(node, str) {
53 53 node.innerHTML = "";
54 54 node.appendChild(document.createTextNode(str));
55   - };
56   -
  55 + },
  56 + testFile,
  57 + changeHandler;
  58 +
57 59 if (window.File && window.FileReader) {
58   - document.getElementById('testFile').addEventListener('change', function(e) {
  60 +
  61 + testFile = document.getElementById('testFile');
  62 +
  63 + changeHandler = function(e) {
59 64 var file = this.files[0],
60 65 fr = new FileReader(),
61 66 input = document.getElementById("in"),
@@ -69,8 +74,14 @@ <h1 id="notsupportedmsg" class="hidden">Your browser does not support the local
69 74 };
70 75
71 76 fr.readAsText(file, "utf-8");
72   -
73   - }, false);
  77 + }
  78 +
  79 + if (testFile.addEventListener) {
  80 + testFile.addEventListener('change', changeHandler, false);
  81 + } else {
  82 + testFile.attachEvent('onChange', changeHandler);
  83 + }
  84 +
74 85 } else {
75 86 document.getElementById("notsupportedmsg").removeClass("hidden");
76 87 }

0 comments on commit f023e8c

Please sign in to comment.
Something went wrong with that request. Please try again.