hypha-debugger 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debugger.d.ts +1 -0
- package/dist/hypha-debugger.js +163 -11
- package/dist/hypha-debugger.js.map +1 -1
- package/dist/hypha-debugger.min.js +2 -2
- package/dist/hypha-debugger.min.js.map +1 -1
- package/dist/hypha-debugger.mjs +162 -12
- package/dist/hypha-debugger.mjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/services/navigate.d.ts +14 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export { getPageInfo, getConsoleLogs, installConsoleCapture } from "./services/i
|
|
|
21
21
|
export { queryDom, clickElement, fillInput, scrollTo, getHtml, getComputedStyles, getElementBounds, } from "./services/dom.js";
|
|
22
22
|
export { takeScreenshot } from "./services/screenshot.js";
|
|
23
23
|
export { executeScript } from "./services/execute.js";
|
|
24
|
-
export { navigate, goBack, goForward, reload } from "./services/navigate.js";
|
|
24
|
+
export { navigate, goBack, goForward, reload, softReplace, installNavigationInterceptor } from "./services/navigate.js";
|
|
25
25
|
export { getReactTree } from "./services/react.js";
|
|
26
26
|
export { getBrowserState, clickElementByIndex, inputText, selectOption, scroll, removeHighlights, disposeController, } from "./services/page-controller.js";
|
|
27
27
|
export { generateSkillMd } from "./services/skill.js";
|
|
@@ -11,6 +11,20 @@
|
|
|
11
11
|
* normal navigation. The debugger config is saved to sessionStorage so
|
|
12
12
|
* re-clicking the bookmarklet reconnects seamlessly.
|
|
13
13
|
*/
|
|
14
|
+
/**
|
|
15
|
+
* Perform a soft page replacement: fetch HTML, inject debugger script,
|
|
16
|
+
* replace the document via document.write(). If the fetch or write fails,
|
|
17
|
+
* falls back to hard navigation.
|
|
18
|
+
*/
|
|
19
|
+
export declare function softReplace(url: string, pushState?: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Install global listeners that intercept same-origin link clicks and
|
|
22
|
+
* form submissions, routing them through soft navigation so the debugger
|
|
23
|
+
* stays connected.
|
|
24
|
+
*
|
|
25
|
+
* Called once from HyphaDebugger.start().
|
|
26
|
+
*/
|
|
27
|
+
export declare function installNavigationInterceptor(): () => void;
|
|
14
28
|
export declare function navigate(url: string): {
|
|
15
29
|
success: boolean;
|
|
16
30
|
message: string;
|