Skip to content

Commit 734cc03

Browse files
committed
feat: move screenshot command to separate background-screenshot module
- Extract screenshot functionality to background-screenshot.js - Remove screenshot implementation from background-commands.js - Maintain same function signature and behavior
1 parent 38074e0 commit 734cc03

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

extension/modules/background-commands.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,6 @@ export const respondWith = async (tabId, obj, selector, xpath) => {
2525
export const respondWithError = async (tabId, code, message, selector, xpath) => {
2626
return respondWith(tabId,{ error: { code, message } }, selector, xpath);
2727
}
28-
29-
30-
export const backgroundCommands = {
31-
navigate,
32-
back,
33-
forward,
34-
close,
35-
click,
36-
hover,
37-
keypress,
38-
screenshot
39-
}
4028
export async function attachDebugger(tabId, action) {
4129
let debuggerAttached = false;
4230
try {
@@ -57,3 +45,15 @@ export async function attachDebugger(tabId, action) {
5745
catch (e) { }
5846
}
5947
}
48+
49+
50+
export const backgroundCommands = {
51+
navigate,
52+
back,
53+
forward,
54+
close,
55+
click,
56+
hover,
57+
keypress,
58+
screenshot
59+
}

0 commit comments

Comments
 (0)