Closed neonstalwart closed 9 years ago
@Raynos
i'm not sure how you prefer to check for undefined
. i would have just done if (target == null)
but i think jshint was forcing ===
so i went with typeof target === "undefined"
another option would be to stop listening for 'resize'
since usually it's fired on window
anyhow which makes it kind of pointless in dom-delegator given that it listens for events on documentElement
.
lgtm.
when you scroll a page in ios in a way that hides the navigation and tab bars, it causes a resize to fire on
documentElement
even thoughwindow
is the target (demo at http://jsbin.com/cuwikexefu).window.parentNode
isundefined
(rather thannull
) and so it means thatgetListener
ends up callingEvStore
with anundefined
target
.this PR causes
getListener
to terminate with anundefined
target
.