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
While implementing support for custom elements in JSDOM, I am facing the following limitation. The create an element for a token algorithm use the intended parent to retrieve the associated document for a newly created node.
In it's current implementation the JSDOM treeAdapter shares the same document for all the created node. However this approach doesn't work in the context of template element, since the HTMLTemplateElment content is associated with an inert template document.
What do you think about extended the current createElement signature to pass the intededParent as parameter?
// The intendedParent can be undefined when this hook is invoked for the root html element.createElement(tagName: string,namespaceURI: string,attrs: Attribute[],intendedParent?: Element): Element;
An alternative viable approach would be to expose in some way the current element stack.
The text was updated successfully, but these errors were encountered:
While implementing support for custom elements in JSDOM, I am facing the following limitation. The create an element for a token algorithm use the intended parent to retrieve the associated document for a newly created node.
In it's current implementation the JSDOM treeAdapter shares the same document for all the created node. However this approach doesn't work in the context of template element, since the HTMLTemplateElment content is associated with an inert template document.
What do you think about extended the current createElement signature to pass the intededParent as parameter?
An alternative viable approach would be to expose in some way the current element stack.
The text was updated successfully, but these errors were encountered: