📜  创建自定义标签 html 代码示例

📅  最后修改于: 2022-03-11 14:52:58.243000             🧑  作者: Mango

代码示例1
The document.registerElement() method is used to create a custom HTML element. This should be passed as the name of your custom element along with an (optional) object that defines the API.

var XTreehouseElement = document.registerElement('x-treehouse');
document.body.appendChild(new XTreehouseElement());