static bool IsInlinableElement(DomNode node) { // TODO It is possible that this element is being retained for some other // reason (like an attribute fragment) // Need to update MarkRetainedNodes to correspond to retaining depending only on work // for compiler constructs. // TODO There might be annotation types that specifically prevent inlining - this is too broad (performance) return(node.IsElement && !(node is HxlElement) && // server element node.ChildNodes.Count == 1 && !node.Attributes.Any(t => t is HxlAttribute) && node.ChildNodes[0] is HxlRenderWorkElement && !node.Annotations <object>().Any()); }