MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / elemByTag

Function elemByTag

src/injected/content/util.js:10–10  ·  view source on GitHub ↗
(tag, i)

Source from the content-addressed store, hash-verified

8 * Note that we avoid spoofed prototype getters by using hasOwnProperty, and not using `length`
9 * as it searches for ALL matching nodes when this tag wasn't cached internally. */
10export const elemByTag = (tag, i) => getOwnProp(document::getElementsByTagName(tag), i || 0);
11const {
12 TextDecoder: SafeTextDecoder,
13} = global;

Callers 3

injectFunction · 0.90
AddElementFunction · 0.90
onElementFunction · 0.85

Calls 1

getOwnPropFunction · 0.85

Tested by

no test coverage detected