MCPcopy Create free account
hub / github.com/WhiteSevs/TamperMonkeyScript / matches

Method matches

lib/pops/src/utils/PopsDOMUtils.ts:1298–1339  ·  view source on GitHub ↗

* 匹配元素,可使用以下的额外语法 * * + :contains([text]) 作用: 找到包含指定文本内容的指定元素 * + :empty 作用:找到既没有文本内容也没有子元素的指定元素 * + :regexp([text]) 作用: 找到符合正则表达式的内容的指定元素 * @param $el 元素 * @param selector 选择器 * @example * DOMUtils.matches("div:contains('测试')") * > true * @example * DOMUtils.matches

($el: HTMLElement | Element | null | undefined, selector: string)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

handlerCallBackMethod · 0.45
isNodeInPopsNodeFunction · 0.45

Calls 2

trimMethod · 0.80
includesMethod · 0.80

Tested by

no test coverage detected