%PDF- %PDF-
Direktori : /var/www/html/node_modules/swiper/shared/ |
Current File : //var/www/html/node_modules/swiper/shared/create-element-if-not-defined.js |
import { getDocument } from 'ssr-window'; export default function createElementIfNotDefined(swiper, originalParams, params, checkProps) { const document = getDocument(); if (swiper.params.createElements) { Object.keys(checkProps).forEach(key => { if (!params[key] && params.auto === true) { let element = swiper.$el.children(`.${checkProps[key]}`)[0]; if (!element) { element = document.createElement('div'); element.className = checkProps[key]; swiper.$el.append(element); } params[key] = element; originalParams[key] = element; } }); } return params; }