This commit is contained in:
Service Account 2022-08-10 12:48:46 +05:30
Родитель 98b99e0459
Коммит 4dbc183eb7
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -60,6 +60,8 @@ const parseHTMLAndKeepRelations = (selector: string) => {
const domElement = {};
domElement[name] ={
"uniqueId": "",
"shifted": false,
"nthChild": _nthChild,
"cssComparisonResult": {},
"attributes": {},
@ -92,6 +94,17 @@ const parseHTMLAndKeepRelations = (selector: string) => {
domElement[name]["missing"] = true;
domElement[name]["userId"] = id;
domElement[name]["parentId"] = parentId;
domElement[name]["uniqueId"] = name + "*" + cleanAttributes(domElement[name]["attributes"]);
}
function cleanAttributes(attr) {
let uniqueStr = "";
Object.entries(attr).forEach((entry) => {
const [key, value] = entry;
console.log(`${key}: ${value}`);
uniqueStr += `${key}:${value}*`
});
return uniqueStr;
}
function findAppliedCSSOnElement(node){