feat(text): 'get text --pierce' reads through CLOSED shadow DOM (#30)
Some injected UI (browser-extension debug panels, web components) renders into a CLOSED shadow root that eval/innerText cannot read. --pierce walks the CDP DOM tree (DOM.getDocument depth:-1 pierce:true), which includes closed shadow roots and child documents, and collects text nodes (skipping script/style/etc). Review-safe: rides the per-tab debugger session already attached, no new Chrome permission and no ab-connect/extension change — so it works in extension-relay mode without touching the published extension. Verified live: a closed-shadow panel that main-world eval reports HIDDEN is read in full via --pierce. First slice of #30 (read extension/injected-panel content). Deeper extension introspection (background SW / chrome.storage) stays a launch-mode / raw-CDP concern, deliberately NOT done by expanding ab-connect's debugger powers.
This commit is contained in:
@@ -1961,6 +1961,7 @@ Retrieves various types of information from elements or the page.
|
||||
Subcommands:
|
||||
text [selector] Element text; no selector = WHOLE PAGE, all frames
|
||||
text --main Main-content text only (skip nav/header/sidebar)
|
||||
text --pierce Read through CLOSED shadow DOM (injected panels)
|
||||
html <selector> Get inner HTML of element
|
||||
value <selector> Get value of input element
|
||||
attr <selector> <name> Get attribute value
|
||||
|
||||
Reference in New Issue
Block a user