1

Following overriding-alert question, I have overwritten all alerts:

window.alert = function() {
    // access text
    console.log(this);
};

Is there a way to access the original alert(the overwritten that I catched) text? this shows the window object.

Itsik Mauyhas
  • 3,824
  • 14
  • 69
  • 114

1 Answers1

0
window.alert = function(attribute) {
   // access text
   console.log(attribute);
};
Michał Kuliński
  • 1,928
  • 3
  • 27
  • 51