I fixed this by simply adding var alert;
However, is this what I should be doing to get the pesky error message to go away? Here is the fix. Here is the fail on www.jshint.com.
I'm trying to learn from the error it throws..not necessarily make them go away.
(function () {
"use strict";
var alert; // added this in to fix
function initialize_page()
{
alert ("hi");
}
addEventListener('load', initialize_page);
})();
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…