feat: create selector nodes for each valid attr

This commit is contained in:
karishmas6
2024-06-05 23:21:48 +05:30
parent cf3b56d343
commit aeed80ee8d

View File

@@ -319,7 +319,17 @@ export const getSelectors = async (page: Page, coordinates: Coordinates) => {
config.attr(attr.name, attr.value)
);
return attrs.map(
(attr): Node => ({
name:
'[' +
cssesc(attr.name, { isIdentifier: true }) +
'="' +
cssesc(attr.value) +
'"]',
penalty: 0.5,
})
);
}