You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
<html><head></head><scriptsrc="./zone.js"></script><script>
function loaded() {varbtn=document.getElementById('btn');console.log('btn click event handler',btn.onclick);}
function btnClick(e) {console.log('clicked',e);}
function blur() {console.log('blur',e);}</script><bodyonload="loaded();"><inputid="txt"type="text"onblur="blur();"/><buttontype="button"id="btn"onclick="btnClick(event);">OK</button></body></html>
after zone.js patched, the button's onclick will be null, if without zone.js patched, the onclick will be btnClick, the problem only occurs when I use inline event handler like above, if I use
I will describe the problem with the sample code
after zone.js patched, the button's onclick will be null, if without zone.js patched, the onclick will be btnClick, the problem only occurs when I use inline event handler like above, if I use
or
the result will be ok.
It seems not the problem of Zone.js itself but the DOM defineProperty.
https://github.com/angular/zone.js/blob/master/lib/common/utils.ts#L69
it seems after definePRoperty, the set will not be called when we use inline event handler.