Created
December 8, 2014 20:11
-
-
Save devdays/a7ef831c34e22a6fdddb to your computer and use it in GitHub Desktop.
Object JavaScript - this refers to object originating event
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
window.addEventListener("error", function (event) { | |
event.target.src = 'some_path'; | |
// `this` will point to window | |
// `event.target` will point to the element that had an error | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment