From 174746d3ca913f61b96c6eb563ab972de1203172 Mon Sep 17 00:00:00 2001 From: Manuel Mujica Date: Fri, 2 Mar 2018 16:22:43 -0700 Subject: [PATCH] Support Edge 14 Closes #44 --- helpers/-make-delegate-event-tree.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers/-make-delegate-event-tree.js b/helpers/-make-delegate-event-tree.js index 075a47c..c4defc3 100644 --- a/helpers/-make-delegate-event-tree.js +++ b/helpers/-make-delegate-event-tree.js @@ -23,7 +23,9 @@ function makeDelegator (domEvents) { do { // document does not implement `.matches` but documentElement does var el = cur === document ? document.documentElement : cur; - if (el.matches(selector)) { + var matches = el.matches || el.msMatchesSelector; + + if (matches.call(el, selector)) { handlers.forEach(function(handler){ handler.call(el, ev); });