<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
proto = Object.create(HTMLElement.prototype, { createdCallback: { value: function() { this.innerHTML = "Hello"; } } }); | |
document.registerElement("x-foo", { prototype: proto }); | |
</script> | |
</head> | |
<body> | |
<x-foo></x-foo> | |
</body> | |
</html> |