Files
fn_registry/functions/browser/cdp_get_html.go
T
egutierrez bf1efb2099 feat: externalize apps/analysis to Gitea repos, add analysis table
- Migration 007: repo_url on apps table + analysis table with FTS5
- Analysis struct, parser, CRUD, validation, hash computation
- Selective purge: remote-only apps/analysis preserved across fn index
- CLI: fn app list/clone/pull, fn analysis list/clone/pull
- search/show/list now include analysis results
- Apps removed from git tracking (content lives in Gitea repos)
- .gitkeep for apps/ and analysis/ dirs
- Bash functions: jupyter analysis pipeline, shell utilities
- Browser domain: CDP functions moved from infra to browser

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 04:23:51 +02:00

21 lines
492 B
Go

package browser
import (
"fmt"
)
// CdpGetHTML retorna el HTML completo de la pagina actual (document.documentElement.outerHTML).
// Equivale a hacer "Ver codigo fuente" pero con el DOM actual (post-JavaScript).
func CdpGetHTML(c *CDPConn) (string, error) {
if c == nil {
return "", fmt.Errorf("cdp get html: conexion nula")
}
html, err := CdpEvaluate(c, "document.documentElement.outerHTML")
if err != nil {
return "", fmt.Errorf("cdp get html: %w", err)
}
return html, nil
}