If I reset window.alert to be some other function, is there any way for me to restore it w/o first “saving” it?
For example:
window.alert = function() { };
After doing that, is there a way of restoring window.alert() to what it used to be? (btw: asking this only for “predefined” DHTML objects – not for random js objects)
You can use
delete:Here’s a working example.