Closed mems closed 1 year ago
DOM 0 event listeners provide scopes that bound to the element:
scope [...] If element is not null, then set scope to NewObjectEnvironment(element, true, scope). — https://html.spec.whatwg.org/multipage/webappapis.html#internal-raw-uncompiled-handler
scope [...]
— https://html.spec.whatwg.org/multipage/webappapis.html#internal-raw-uncompiled-handler
That means you can use:
<img src="about:error" onerror="console.log(this,onerror,body,src)">
Will log:
HTMLImageElement
document.body
src
DOM 0 event listeners provide scopes that bound to the element:
That means you can use:
Will log:
HTMLImageElement
instancedocument.body
src
property value