script function
Implementation
ElementNode script({
String? src,
bool async = false,
bool defer = false,
String? type,
String? content,
}) {
return el(
'script',
attrs: {
if (src != null) 'src': StringAttribute(src),
if (type != null) 'type': StringAttribute(type),
if (async) 'async': BooleanAttribute(true),
if (defer) 'defer': BooleanAttribute(true),
},
children: content != null ? [text(content)] : const [],
);
}