Unbreak accidental back-compat break with event optimization (#2222)
This was supposed to be purely additive. See here for more details: https://github.com/MithrilJS/mithril.js/pull/1949#issuecomment-417824513
This commit is contained in:
parent
f4ddcc4b24
commit
c703b03253
6 changed files with 80 additions and 11 deletions
|
|
@ -364,10 +364,18 @@ module.exports = function(options) {
|
|||
e.preventDefault = function() {
|
||||
prevented = true
|
||||
}
|
||||
Object.defineProperty(e, "$defaultPrevented", {
|
||||
configurable: true,
|
||||
get: function () { return prevented }
|
||||
})
|
||||
var stopped = false
|
||||
e.stopPropagation = function() {
|
||||
stopped = true
|
||||
}
|
||||
Object.defineProperty(e, "$propagationStopped", {
|
||||
configurable: true,
|
||||
get: function () { return prevented }
|
||||
})
|
||||
e.eventPhase = 1
|
||||
try {
|
||||
for (var i = parents.length - 1; 0 <= i; i--) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue