Created
January 17, 2019 07:12
-
-
Save projektorius96/0b25dc899cce2bd0046a1879c9078c79 to your computer and use it in GitHub Desktop.
eListener-with-parameters for [object Window] (console.log example)
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
function eHandler(e, addCustomColor) { | |
var objTarget = e.target; | |
objTarget.style.backgroundColor = addCustomColor;} | |
var variableWin = this; // keyword THIS represent [object Window] in JS | |
variableWin.addEventListener('mouseover', function (e) { | |
eHandler (e, 'yellow'); }, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment