From 8a37045b798fd66ede9c68774f9bb657e28d956a Mon Sep 17 00:00:00 2001 From: Johann-S Date: Sat, 23 Feb 2019 00:37:55 +0200 Subject: move util in a util folder with the sanitizer --- js/src/dom/eventHandler.js | 5 +++-- js/src/dom/polyfill.js | 6 ++++-- js/src/dom/selectorEngine.js | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'js/src/dom') diff --git a/js/src/dom/eventHandler.js b/js/src/dom/eventHandler.js index 3b42388b8..d92920cda 100644 --- a/js/src/dom/eventHandler.js +++ b/js/src/dom/eventHandler.js @@ -5,8 +5,10 @@ * -------------------------------------------------------------------------- */ +import { + jQuery as $ +} from '../util/index' import Polyfill from './polyfill' -import Util from '../util' /** * ------------------------------------------------------------------------ @@ -248,7 +250,6 @@ const EventHandler = { const typeEvent = event.replace(stripNameRegex, '') const inNamespace = event !== typeEvent const isNative = nativeEvents.indexOf(typeEvent) > -1 - const $ = Util.jQuery let jQueryEvent let bubbles = true diff --git a/js/src/dom/polyfill.js b/js/src/dom/polyfill.js index cbae0f668..579b7a10e 100644 --- a/js/src/dom/polyfill.js +++ b/js/src/dom/polyfill.js @@ -5,7 +5,9 @@ * -------------------------------------------------------------------------- */ -import Util from '../util' +import { + getUID +} from '../util/index' /* istanbul ignore next */ const Polyfill = (() => { @@ -48,7 +50,7 @@ const Polyfill = (() => { const hasId = Boolean(this.id) if (!hasId) { - this.id = Util.getUID('scope') + this.id = getUID('scope') } let nodeList = null diff --git a/js/src/dom/selectorEngine.js b/js/src/dom/selectorEngine.js index 95b5a9fb5..151bb54c7 100644 --- a/js/src/dom/selectorEngine.js +++ b/js/src/dom/selectorEngine.js @@ -6,7 +6,9 @@ */ import Polyfill from './polyfill' -import Util from '../util' +import { + makeArray +} from '../util/index' /** * ------------------------------------------------------------------------ @@ -44,7 +46,7 @@ const SelectorEngine = { return null } - const children = Util.makeArray(element.children) + const children = makeArray(element.children) return children.filter((child) => this.matches(child, selector)) }, -- cgit v1.2.3