= document.registerElement('x-foo', { prototype: { __proto__: HTMLElement.prototype, ! // Lifecycle: creation of instance createdCallback: function () { ... }, ! // Lifecycle: instance inserted into document attachedCallback: function () { ... }, ! // Lifecycle: instance removed from document detachedCallback: function () { ... }, ! // Lifecycle: attribute added, removed, changed attributeChangedCallback: function ( attrName, oldVal, newVal) { ... }, } }); 44