-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
event.target should match event.currentTarget at time of dispatch #18
Comments
err, no i think this is wrong too.
Element.prototype.dispatchEvent = function(event) {
let t = event.target = this,
c = event.cancelable,
l, i;
do {
l = t.__handlers && t.__handlers[(event.type).toLowerCase()];
if (l && (event.currentTarget = t)) for (i=l.length; i--; ) {
if ((l[i].call(t, event)===false || event._end) && c) break;
}
} while (event.bubbles && !(c && event._stop) && (t=t.parentNode));
return !event.defaultPrevented;
}; i think this is correct, but plz doublecheck. |
That is correct, yes. |
FWIW, i had to make some other additions/tweaks to undom to get all my tests fully working (that already passed in browsers), though i cannot guarantee my impls are anything close to DOM spec compliant :D feel free to cherry pick anything you find useful. https://github.com/leeoniya/domvm/blob/3.x-dev/test/init-spec.js |
Whoops, had those properties reversed! |
https://github.com/developit/undom/blob/master/src/undom.js#L140
should be
The text was updated successfully, but these errors were encountered: