public override Node Clone(Document owner, Boolean deep) { var template = new HtmlTemplateElement(owner); CloneElement(template, owner, deep); var clonedContent = template._content; foreach (var child in _content.ChildNodes) { if (child is Node node) { var clone = node.Clone(owner, deep); clonedContent.AddNode(clone); } } return(template); }
internal override Node Clone(Document owner, Boolean deep) { var template = new HtmlTemplateElement(owner); CloneElement(template, owner, deep); var clonedContent = template._content; foreach (var child in _content.ChildNodes) { var node = child as Node; if (node != null) { var clone = node.Clone(owner, deep); clonedContent.AddNode(clone); } } return(template); }