blob: 24841c557e8cb95a66a91648d1b13e0fb84e4cb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import { adopt } from '../../utils/adopter.js'
import { globals } from '../../utils/window.js'
import { map } from '../../utils/utils.js'
import List from '../../types/List.js'
export default function baseFind (query, parent) {
return new List(map((parent || globals.document).querySelectorAll(query), function (node) {
return adopt(node)
}))
}
// Scoped find method
export function find (query) {
return baseFind(query, this.node)
}
|