feat: check if el tag name valid

This commit is contained in:
karishmas6
2024-06-05 23:23:38 +05:30
parent aba844e4a4
commit 161af107ec

View File

@@ -343,7 +343,19 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
);
}
function tagName(input: Element): Node | null {
const name = input.tagName.toLowerCase();
if (config.tagName(name)) {
return {
name,
penalty: 2,
};
}
return null;
}
};