You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an issue while skipping the difference. My use case is that I want to skip all the changes made to BODY element and I am using preVirtualDiffApply with true. It is looping me in infinite circle
Initializing:
window.domDifferenceInstance = new DiffDOM({
preVirtualDiffApply: function (info) {
if (info.node && info.node.nodeName === "BODY") {
console.log("info", info);
// Handle the specific condition for the BODY element
console.log("Here's a special case involving the BODY element");
// Return true only for this specific condition
return true;
}
return false;
},
});
Using function:
export function compareDoms(dom1: HTMLBodyElement | null) {
if (!dom1) {
return;
}
const updatedDOM = document.body.cloneNode(true) as HTMLBodyElement;
const diff = window.domDifferenceInstance.diff(dom1, updatedDOM);
console.log(diff);
I am facing an issue while skipping the difference. My use case is that I want to skip all the changes made to BODY element and I am using preVirtualDiffApply with true. It is looping me in infinite circle
Initializing:
window.domDifferenceInstance = new DiffDOM({
preVirtualDiffApply: function (info) {
if (info.node && info.node.nodeName === "BODY") {
console.log("info", info);
// Handle the specific condition for the BODY element
console.log("Here's a special case involving the BODY element");
// Return true only for this specific condition
return true;
}
return false;
},
});
Using function:
export function compareDoms(dom1: HTMLBodyElement | null) {
if (!dom1) {
return;
}
const updatedDOM = document.body.cloneNode(true) as HTMLBodyElement;
const diff = window.domDifferenceInstance.diff(dom1, updatedDOM);
console.log(diff);
const diffJson = JSON.stringify(diff);
return diffJson;
}
The text was updated successfully, but these errors were encountered: