createElementNs method
void
createElementNs(
- CompileElement parent,
- NodeReference elementRef,
- int nodeIndex,
- String? ns,
- String tagName,
- TemplateAst ast,
Creates an html node with a namespace and appends to parent element.
Implementation
void createElementNs(CompileElement parent, NodeReference elementRef,
int nodeIndex, String? ns, String tagName, TemplateAst ast) {
if (docVarName == null) {
_createMethod.addStmt(_createLocalDocumentVar());
}
var createRenderNodeExpr = o
.variable(docVarName)
.callMethod('createElementNS', [o.literal(ns), o.literal(tagName)]);
_initializeAndAppendNode(parent, elementRef, createRenderNodeExpr);
}