Skip to content

Commit

Permalink
[docs] make code samples in component lifecycle consistent (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
odanado authored May 30, 2024
1 parent b2e01f4 commit 18419ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ In `connectedCallback()` you should setup tasks that should only occur when the
```js
connectedCallback() {
super.connectedCallback()
addEventListener('keydown', this._handleKeydown);
window.addEventListener('keydown', this._handleKeydown);
}
```
### disconnectedCallback() {#disconnectedcallback}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ In `connectedCallback()` you should setup tasks that should only occur when the
```js
connectedCallback() {
super.connectedCallback()
addEventListener('keydown', this._handleKeydown);
window.addEventListener('keydown', this._handleKeydown);
}
```
### disconnectedCallback() {#disconnectedcallback}
Expand Down

0 comments on commit 18419ed

Please sign in to comment.