Skip to content

Commit b2a08f4

Browse files
fix laser visualization bug
1 parent f7f34ed commit b2a08f4

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/extension/background.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,17 @@ async function axRecord(tabId) {
207207
}
208208
}
209209

210-
210+
// Chrome Debugger API is unused unless accessibility features are toggled on with UI.
211+
// This function will replace the current empty snapshot if accessibility features are toggled on and the current location's accessibility snapshot has not yet been recorded.
212+
async function replaceEmptySnap(tabsObj, tabId, toggleAxRecord) {
213+
if (tabsObj[tabId].currLocation.axSnapshot === 'emptyAxSnap' && toggleAxRecord === true) {
214+
// add new ax snapshot to currlocation
215+
const addedAxSnap = await axRecord(tabId);
216+
tabsObj[tabId].currLocation.axSnapshot = addedAxSnap;
217+
// modify array to include the new recorded ax snapshot
218+
tabsObj[tabId].axSnapshots[tabsObj[tabId].currLocation.index] = addedAxSnap;
219+
}
220+
}
211221

212222
// This function will create the first instance of the test app's tabs object
213223
// which will hold test app's snapshots, link fiber tree info, chrome tab info, etc.

0 commit comments

Comments
 (0)