Skip to content

Commit 1a00794

Browse files
committed
fix: comment cssPath class parser. path could not resolve element
1 parent 3a85050 commit 1a00794

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

src/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ export function cssPath(node, container) {
3232
node = '';
3333
}
3434
else {
35-
if (node.classList.length) {
36-
node.classList.forEach((item) => {
37-
if (item.indexOf(":") === -1) pathSplit += "." + item;
38-
});
39-
}
35+
// if (node.classList.length) {
36+
// node.classList.forEach((item) => {
37+
// if (item.indexOf(":") === -1) pathSplit += "." + item;
38+
// });
39+
// }
4040

4141
if (node.parentNode && node.parentNode.children.length > 1) {
4242
// ToDo: improve array logic so ignores javascript generated html??

src/index.old.js

+11
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,17 @@ async function complexSelector(comSelector, callback) {
345345
return callback(canvas.contentWindow.document, selector);
346346
}
347347

348+
// function eid(html){
349+
// let dom = domParser(html);
350+
// let elements = dom.querySelectorAll('*');
351+
// for (let element of elements){
352+
// if (!element.getAttribute('eid')){
353+
// element.setAttribute(eid, uuid(8))
354+
// }
355+
// }
356+
// return dom.outterHTML
357+
// }
358+
348359

349360
// export function computeStyles(el, properties) {
350361
// let computed = window.getComputedStyle(el);

0 commit comments

Comments
 (0)