News for hackers. Stuff that matters.
Re:Bootstrap 5 will remove jQuery as a dependency by nicoburns on Tuesday February 12, 2019 @07:36PM (#19149228)

  let queryAll = (q: string): HTMLElement[] => {
    let nodes = document.querySelectorAll(q);
    return Array.from(nodes).filter(node => (node instanceof HTMLElement)) as HTMLElement[];
  }
Will do the same. Note that `Array.from()` is a relatively new method, that you will need to polyfill if you wish to support internet explorer, but `Array.prototype.slice.call()` serves the same purpose and can be used in older browsers.

There are no comments on this comment yet.