MCPcopy Create free account
hub / github.com/SKVNDR/FastDork / isValidSelector

Function isValidSelector

Script/siteconfig.js:72–83  ·  view source on GitHub ↗
(selector)

Source from the content-addressed store, hash-verified

70 }
71
72 function isValidSelector(selector) {
73 if (!selector || typeof selector !== "string") return false;
74 try {
75 // Test the first part if it's a comma-separated list
76 document
77 .createDocumentFragment()
78 .querySelector(selector.split(",")[0].trim());
79 return true;
80 } catch (e) {
81 return false;
82 }
83 }
84
85 function parseLineList(value) {
86 return String(value || "")

Callers 1

saveConfigurationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected