This commit is contained in:
Josh at WLTechBlog
2025-10-03 15:26:46 -05:00
parent 3a1e01b2c6
commit d7e0a892f3

View File

@@ -12271,8 +12271,8 @@ func (d *Daemon) getFormAccessibilityAudit(tabID, formSelector string, timeout i
}
// JavaScript to analyze forms
jsCode := `
(function() {
// Note: page.Eval() expects an arrow function, not an IIFE
jsCode := `() => {
try {
const forms = document.querySelectorAll('` + selector + `');
const result = {
@@ -12338,8 +12338,7 @@ func (d *Daemon) getFormAccessibilityAudit(tabID, formSelector string, timeout i
forms: []
};
}
})();
`
}`
// Execute JavaScript with timeout
var resultData interface{}