-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: this keyword in constructSubtreeForNode makes error #13
Comments
Hey @TroyTae - thank you so much for your contribution and welcome to the project! I would suggest to use the module as a whole when testing it, like this: const subtree = require('./subtree');
test("shadow root", () => {
const nodeName = "DIV";
const subTree = constructSubtreeForNode(document, {
nodeType: NODE_TYPES.ELEMENT_NODE,
nodeName: nodeName,
children: [createElemForNode(document, 'all', {
nodeType: NODE_TYPES.ELEMENT_NODE,
nodeName: nodeName
})],
shadowRoots: [createElemForNode(document, 'all', {
nodeType: NODE_TYPES.ELEMENT_NODE,
nodeName: nodeName
})]
});
}); |
I think that solves the problem, should I be wrong, please reopen the issue and let me know :) |
Yes of course the code can fix problem. |
I understand that point, but |
When I import module like this:
const {constructSubtreeForNode, constructShadowTree} = require("./subtree");
this
keyword makes error at this point:dom2html/subtree.js
Line 41 in dbabc5e
I wanna talk about how can we fix this :)
The text was updated successfully, but these errors were encountered: