MCPcopy Create free account
hub / github.com/XIU2/UserScript / getElementByCSS

Function getElementByCSS

Zhiyoo-Enhanced.user.js:428–430  ·  view source on GitHub ↗
(css, contextNode = document)

Source from the content-addressed store, hash-verified

426 },
427 };
428 function getElementByCSS(css, contextNode = document) {
429 return contextNode.querySelector(css);
430 }
431 function getAllElementsByCSS(css, contextNode = document) {
432 return [].slice.call(contextNode.querySelectorAll(css));
433 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected