}
}
- [].slice.call(SelectorEngine.find(Selector.ITEM_IMG, this._element)).forEach((itemImg) => {
+ Util.makeArray(SelectorEngine.find(Selector.ITEM_IMG, this._element)).forEach((itemImg) => {
EventHandler.on(itemImg, Event.DRAG_START, (e) => e.preventDefault())
})
_getItemIndex(element) {
this._items = element && element.parentNode
- ? [].slice.call(SelectorEngine.find(Selector.ITEM, element.parentNode))
+ ? Util.makeArray(SelectorEngine.find(Selector.ITEM, element.parentNode))
: []
return this._items.indexOf(element)
-import Util from '../util'
-
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/polyfill.js
* --------------------------------------------------------------------------
*/
+import Util from '../util'
+
/* istanbul ignore next */
const Polyfill = (() => {
// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
return
}
- const items = [].slice.call(parent.querySelectorAll(Selector.VISIBLE_ITEMS))
+ const items = Util.makeArray(parent.querySelectorAll(Selector.VISIBLE_ITEMS))
if (!items.length) {
return
+/**
+ * --------------------------------------------------------------------------
+ * Bootstrap (v4.3.1): index.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
import Alert from './alert'
import Button from './button'
import Carousel from './carousel'
import Tooltip from './tooltip'
import Util from './util'
-/**
- * --------------------------------------------------------------------------
- * Bootstrap (v4.3.1): index.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * --------------------------------------------------------------------------
- */
-
export {
Util,
Alert,
* --------------------------------------------------------------------------
*/
+import Util from '../util'
+
const uriAttrs = [
'background',
'cite',
const domParser = new window.DOMParser()
const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')
const whitelistKeys = Object.keys(whiteList)
- const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))
+ const elements = Util.makeArray(createdDocument.body.querySelectorAll('*'))
for (let i = 0, len = elements.length; i < len; i++) {
const el = elements[i]
continue
}
- const attributeList = [].slice.call(el.attributes)
+ const attributeList = Util.makeArray(el.attributes)
const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
attributeList.forEach((attr) => {