feat: use bottomUpSearch for path

This commit is contained in:
karishmas6
2024-06-05 10:45:15 +05:30
parent 4dd35d599b
commit 1afd38f1c0

View File

@@ -159,7 +159,10 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
rootDocument = findRootDocument(config.root, defaults);
let path = bottomUpSearch(input, Limit.All, () =>
bottomUpSearch(input, Limit.Two, () => bottomUpSearch(input, Limit.One))
);
}
function findRootDocument(rootNode: Element | Document, defaults: Options) {