【文件属性】:
文件名称:query:用于查询页面元素的模块
文件大小:134KB
文件格式:ZIP
更新时间:2021-04-04 18:37:37
library browser npm-package TypeScript
询问
用于查询页面元素的模块。
安装
npm install --save @blackglory/query
# or
yarn add @blackglory/query
用法
import { query , css , xpath } from '@blackglory/query'
const elements = query (
css ` main `
, xpath `.//h2[text()="Title"]`
, xpath `../div`
)
原料药
type ISelectorResult =
| null
| undefined
| Node
| Iterable < Node>
type ISelector =
| ( ( node : Node ) => ISelectorResult )
| ( ( this : Document , node :
【文件预览】:
query-master
----tsconfig.build.json(189B)
----rollup.config.js(2KB)
----.github()
--------workflows()
----commitlint.config.js(68B)
----yarn.lock(270KB)
----.eslintrc.js(302B)
----src()
--------query-all.ts(2KB)
--------utils()
--------types.ts(200B)
--------index.ts(737B)
--------query.ts(681B)
--------selectors()
----tsconfig.base.json(331B)
----tsconfig.json(133B)
----LICENSE(1KB)
----jest.config.js(323B)
----__tests__()
--------utils.ts(224B)
--------selectors()
--------integration.test.ts(473B)
--------query-all.spec.ts(5KB)
----README.md(4KB)
----.gitignore(901B)
----CHANGELOG.md(2KB)
----.eslintignore(40B)
----package.json(3KB)