How to use the @cycjimmy/awesome-js-funcs/typeConversion/nodeListToArray function in @cycjimmy/awesome-js-funcs

To help you get started, we’ve selected a few @cycjimmy/awesome-js-funcs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cycjimmy / h5-webpack-starter / app / mainComponent / jsmpegDemo / jsmpegDemo.component.ins.js View on Github external
paramInit() {
    this.oVideoWrapper = this.context.querySelector('.' + _style.videoWrapper);
    this.aVideoChooseBtns = nodeListToArray(this.context.querySelectorAll('.' + _style.videoChoose));
  };
github cycjimmy / swiper-animation / src / index.js View on Github external
.then(() => {
        this.activeBoxes = [
          ...nodeListToArray(
            this.swiper.slides[this.swiper.activeIndex].querySelectorAll('[data-swiper-animation]')
          ),
          ...nodeListToArray(
            this.swiper.slides[this.swiper.activeIndex].querySelectorAll(
              '[data-swiper-animation-once]'
            )
          )
        ];

        const runAnimations = this.activeBoxes.map((el) => {
          if (!el.animationData) {
            return Promise.resolve();
          }

          return functionToPromise(() => {
            el.style.visibility = 'visible';
github cycjimmy / swiper-animation / src / Animations.js View on Github external
_updateActiveElements() {
    this.activeElements = [
      ...nodeListToArray(
        this.swiper.slides[this.swiper.activeIndex].querySelectorAll('[data-swiper-animation]')
      ),
      ...nodeListToArray(
        this.swiper.slides[this.swiper.activeIndex].querySelectorAll('[data-swiper-animation-once]')
      )
    ];

    return this.activeElements;
  }
}
github cycjimmy / h5-webpack-starter / app / share / QueryAll.js View on Github external
constructor(selectorOrEls, context = document) {
    let elements = null;

    if (isString(selectorOrEls)) {
      elements = context.querySelectorAll(selectorOrEls);
    } else {
      elements = selectorOrEls;
    }

    this.nodeList = nodeListToArray(elements);
  };
github cycjimmy / swiper-animation / src / Animations.js View on Github external
constructor(swiper) {
    this.swiper = swiper;
    this.container = getSwiperContainer(this.swiper);
    this.animationElements = [
      ...nodeListToArray(this.container.querySelectorAll('[data-swiper-animation]')),
      ...nodeListToArray(this.container.querySelectorAll('[data-swiper-animation-once]'))
    ];
    this.activeElements = [];

    cacheAnimations(this.animationElements);
  }
github cycjimmy / swiper-animation / src / Animations.js View on Github external
_updateActiveElements() {
    this.activeElements = [
      ...nodeListToArray(
        this.swiper.slides[this.swiper.activeIndex].querySelectorAll('[data-swiper-animation]')
      ),
      ...nodeListToArray(
        this.swiper.slides[this.swiper.activeIndex].querySelectorAll('[data-swiper-animation-once]')
      )
    ];

    return this.activeElements;
  }
}