Skip to content

Commit 63e2903

Browse files
Merge pull request #38 from filipbech/patch-1
Change detachedCallback to disconnectedCallback
2 parents e5dd76e + 92d4c37 commit 63e2903

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function register(Component, tagName, propNames, options) {
1111
PreactElement.prototype.constructor = PreactElement;
1212
PreactElement.prototype.connectedCallback = connectedCallback;
1313
PreactElement.prototype.attributeChangedCallback = attributeChangedCallback;
14-
PreactElement.prototype.detachedCallback = detachedCallback;
14+
PreactElement.prototype.disconnectedCallback = disconnectedCallback;
1515
PreactElement.observedAttributes = propNames || Component.observedAttributes || Object.keys(Component.propTypes || {});
1616

1717
return customElements.define(
@@ -40,7 +40,7 @@ function attributeChangedCallback(name, oldValue, newValue) {
4040
render(this._vdom, this._root);
4141
}
4242

43-
function detachedCallback() {
43+
function disconnectedCallback() {
4444
render(this._vdom = null, this._root);
4545
}
4646

0 commit comments

Comments
 (0)