diff options
author | XhmikosR <xhmikosr@gmail.com> | 2020-05-02 16:31:51 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-11-14 16:54:50 +0300 |
commit | 53ec604eb1bc8860128db832d8820f76531e1208 (patch) | |
tree | d9d8db799aab54b600ed11d6cebf2209bf001438 /js | |
parent | 6d7bc54d222709275b0eb73bd6b974509332247a (diff) |
Use `String.startsWith`
Diffstat (limited to 'js')
-rw-r--r-- | js/src/dom/event-handler.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/dom/event-handler.js b/js/src/dom/event-handler.js index 439a3f1881..ceb6a6e6ee 100644 --- a/js/src/dom/event-handler.js +++ b/js/src/dom/event-handler.js @@ -235,7 +235,7 @@ const EventHandler = { const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn) const inNamespace = typeEvent !== originalTypeEvent const events = getEvent(element) - const isNamespace = originalTypeEvent.charAt(0) === '.' + const isNamespace = originalTypeEvent.startsWith('.') if (typeof originalHandler !== 'undefined') { // Simplest case: handler is passed, remove that listener ONLY. |