Appearance
KBE3D / KBCore / utils / createDom
函数: createDom()
createDom(
tagName:string,className?:string,container?:HTMLElement|null):HTMLElement
创建一个tagName的HTML元素,将其class设置为className,并可选择将其添加到container元素中
参数
tagName
string
元素类型,比如 div
className?
string = ''
附加的class样式名,默认为空字符串
container?
添加到指定的父节点,默认不添加
HTMLElement | null
返回
HTMLElement
创建好的DOM元素
