<!DOCTYPE html><html><body><p>Click the button to create a custom element object.</p><buttononclick="createCustomElement()">Create Element</button><script>functioncreateCustomElement() {
// Create a new custom elementvar myElement = document.createElement("custom-element");
// Add some text to the custom elementvar node = document.createTextNode("This is a custom element");
myElement.appendChild(node);
// Append the custom element to the body of the pagedocument.body.appendChild(myElement);
}
</script></body></html>