New changes
This commit is contained in:
Родитель
98b99e0459
Коммит
4dbc183eb7
|
@ -60,6 +60,8 @@ const parseHTMLAndKeepRelations = (selector: string) => {
|
||||||
const domElement = {};
|
const domElement = {};
|
||||||
|
|
||||||
domElement[name] ={
|
domElement[name] ={
|
||||||
|
"uniqueId": "",
|
||||||
|
"shifted": false,
|
||||||
"nthChild": _nthChild,
|
"nthChild": _nthChild,
|
||||||
"cssComparisonResult": {},
|
"cssComparisonResult": {},
|
||||||
"attributes": {},
|
"attributes": {},
|
||||||
|
@ -92,6 +94,17 @@ const parseHTMLAndKeepRelations = (selector: string) => {
|
||||||
domElement[name]["missing"] = true;
|
domElement[name]["missing"] = true;
|
||||||
domElement[name]["userId"] = id;
|
domElement[name]["userId"] = id;
|
||||||
domElement[name]["parentId"] = parentId;
|
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){
|
function findAppliedCSSOnElement(node){
|
||||||
|
|
Загрузка…
Ссылка в новой задаче