Last active
June 25, 2018 10:26
-
-
Save craigiswayne/591db4c3e6b1da1fa7b58c3034c05727 to your computer and use it in GitHub Desktop.
Debugging the window.open function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Debugging window.open function | |
* Overwrites the origin window.open function so that you can see the call stack | |
* And debug variables | |
* @see https://www.w3schools.com/Jsref/met_win_open.asp | |
*/ | |
window.open = function( URL, name, specs, replace ){ | |
console.group("Debugging the window.open function"); | |
console.log("URL : " + URL); | |
console.log("name : " + name); | |
console.log("specs : " + specs); | |
console.log("replace: " + replace); | |
console.groupEnd(); | |
debugger; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment