import {NullError} from "../common/exceptions" function attributesToSet(obj1: Element, obj2: Element) : Set{ const set : Set = new Set(); for(let i = 0;i) : boolean{ Array.from(attributeSet.values()).forEach((v) =>{ const value1 = obj1.getAttribute(v); const value2 = obj2.getAttribute(v); if(v == "href" || v == "xlink:href"){ }else{ if(value1 != value2){ throw new Error(`${v}/${value1}/${value2}`); } } }) return true; } function equal_html(obj1: Element, obj2: Element, checkAttributes : boolean) : boolean { if(checkAttributes){ const attrNames = attributesToSet(obj1, obj2); equal_attributes(obj1, obj2, attrNames); } const childsize1 = obj1.children.length; const childsize2 = obj2.children.length; if(childsize1 == childsize2){ for(let i=0;i