Don't display browser alerts when box is unchecked
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Tue, 17 May 2011 14:03:31 -0600
changeset 139 15a247a522f5
parent 138 55b23575c01b
child 140 d6de0dbfe523
Don't display browser alerts when box is unchecked

Otherwise some rows will permanently clutter things up, since I can't
fix browser alerts.
autoimplementation.html
--- a/autoimplementation.html	Tue May 17 14:01:08 2011 -0600
+++ b/autoimplementation.html	Tue May 17 14:03:31 2011 -0600
@@ -78,7 +78,7 @@
 <!-- Note: this is completely not a hack at all. -->
 <style id=alerts>/* tr:not(.alert):not(:first-child) { display: none } */</style>
 
-<label><input id=alert-checkbox type=checkbox accesskey=a checked onclick='updateAlertRowStyle()'> Display non-alert rows</label>
+<label><input id=alert-checkbox type=checkbox accesskey=a checked onclick='updateAlertRowStyle()'> Display rows without spec alerts</label>
 
 <script>
 // Confusingly, we're storing a string here, not a boolean.
@@ -1600,13 +1600,13 @@
 					break;
 				}
 			}
-			var tr = alertDiv;
-			while (tr.tagName != "TR") {
-				tr = tr.parentNode;
+			var td = alertDiv;
+			while (td.tagName != "TD") {
+				td = td.parentNode;
 			}
 			alertDiv.parentNode.removeChild(alertDiv);
-			if (!tr.querySelector(".alert")) {
-				tr.classList.remove("alert");
+			if (!td.querySelector(".alert")) {
+				td.parentNode.classList.remove("alert");
 			}
 		} })(key, newValue, alertDiv);
 	}
@@ -1688,7 +1688,6 @@
 			testDiv.contenteditable = "inherit";
 			testDiv.removeAttribute("spellcheck");
 		}
-		browserCell.parentNode.className = "alert";
 		browserCell.lastChild.className = "alert";
 		browserCell.lastChild.textContent = "Exception: " + e;
 		if (typeof e == "object" && "stack" in e) {