Skip to content

Instantly share code, notes, and snippets.

@ujeenator
Created July 28, 2017 19:14
Show Gist options
  • Save ujeenator/7d9d10dafec7385c4d85659754b6ebd0 to your computer and use it in GitHub Desktop.
Save ujeenator/7d9d10dafec7385c4d85659754b6ebd0 to your computer and use it in GitHub Desktop.
Array.from(document.querySelectorAll('*')).forEach(
p => {
p.onblur = function(e) {
console.log('1')
e.preventDefault()
e.stopPropagation()
console.log('2')
return false
}
}
)
/*
var addEventListenerOriginal = DOMElement.prototype.addEventListener
DOMElement.prototype.addEventListener = function() {
if (arguments[0] === 'blur') {
return
}
return addEventListenerOriginal.apply(this, arguments)
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment