self.errorhandler = function () {
  return false;
}
document.onerror = errorhandler;
