[html5] r4984 - [e] (0) fix scripts
whatwg at whatwg.org
whatwg at whatwg.org
Wed Apr 7 16:08:46 PDT 2010
Author: ianh
Date: 2010-04-07 16:08:46 -0700 (Wed, 07 Apr 2010)
New Revision: 4984
Modified:
complete.html
index
Log:
[e] (0) fix scripts
Modified: complete.html
===================================================================
--- complete.html 2010-04-07 09:22:49 UTC (rev 4983)
+++ complete.html 2010-04-07 23:08:46 UTC (rev 4984)
@@ -52,13 +52,17 @@
}
function closeAlert() {
clearTimeout(currentAlertTimeout);
- currentAlert.className = 'closed';
- currentAlertTimeout = setTimeout(closeAlert2, 3000);
+ if (currentAlert) {
+ currentAlert.className = 'closed';
+ currentAlertTimeout = setTimeout(closeAlert2, 3000);
+ }
}
function closeAlert2() {
clearTimeout(currentAlertTimeout);
- currentAlert.parentNode.removeChild(currentAlert);
- currentAlert = null;
+ if (currentAlert) {
+ currentAlert.parentNode.removeChild(currentAlert);
+ currentAlert = null;
+ }
}
window.addEventListener('keydown', function (event) {
if (event.keyCode == 27) {
Modified: index
===================================================================
--- index 2010-04-07 09:22:49 UTC (rev 4983)
+++ index 2010-04-07 23:08:46 UTC (rev 4984)
@@ -52,13 +52,17 @@
}
function closeAlert() {
clearTimeout(currentAlertTimeout);
- currentAlert.className = 'closed';
- currentAlertTimeout = setTimeout(closeAlert2, 3000);
+ if (currentAlert) {
+ currentAlert.className = 'closed';
+ currentAlertTimeout = setTimeout(closeAlert2, 3000);
+ }
}
function closeAlert2() {
clearTimeout(currentAlertTimeout);
- currentAlert.parentNode.removeChild(currentAlert);
- currentAlert = null;
+ if (currentAlert) {
+ currentAlert.parentNode.removeChild(currentAlert);
+ currentAlert = null;
+ }
}
window.addEventListener('keydown', function (event) {
if (event.keyCode == 27) {
More information about the Commit-Watchers
mailing list