I've noticed that the order of 'click' and 'change' events are different in Chrome and Firefox.
See this JSFiddle for example: http://jsfiddle.net/5jz2g/3/
JavaScript:
var el = $('foo');
var fn = function(e) {
console.log(e.type);
}
el.addEvent('change', fn);
el.addEvent('click', fn);
In Chrome this logs:
change
click
And in Firefox this logs:
click
change
Is there a standard for the order of events? Which should fire first? The MDN doesn't seem to mention this and I couldn't find a thing about this in the W3C documents.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…