Implement kind of a DOM API to manipulate the tree, so far the tree should be traversed manually, like this https://github.com/vitkarpov/fast-xml-parser/pull/18 Look at Dropcss (how it uses DOM API), https://github.com/leeoniya/dropcss/blob/master/src/adapter.js
Implement kind of a DOM API to manipulate the tree, so far the tree should be traversed manually, like this #18
Look at Dropcss (how it uses DOM API), https://github.com/leeoniya/dropcss/blob/master/src/adapter.js