MCPcopy Create free account
hub / github.com/debbide/GeoFill / isVisible

Function isVisible

scripts/content.js:156–167  ·  view source on GitHub ↗

* 检查元素是否可见

(element)

Source from the content-addressed store, hash-verified

154 * 检查元素是否可见
155 */
156function isVisible(element) {
157 if (!element) return false;
158
159 const style = window.getComputedStyle(element);
160 const rect = element.getBoundingClientRect();
161
162 return style.display !== 'none' &&
163 style.visibility !== 'hidden' &&
164 style.opacity !== '0' &&
165 rect.width > 0 &&
166 rect.height > 0;
167}
168
169/**
170 * 模拟用户输入(增强版,支持 React/Vue 等框架)

Callers 6

findFieldByLabelFunction · 0.85
findFieldFunction · 0.85
findFullNameFieldFunction · 0.85
findAllFieldsFunction · 0.85
scanFormFunction · 0.85
fillFormSmartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected