Skip to content

Commit

Permalink
Update files/en-us/web/api/htmldetailselement/toggle_event/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
tim-we and github-actions[bot] authored May 25, 2024
1 parent c6f8f53 commit 28f16e1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions files/en-us/web/api/htmldetailselement/toggle_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ ontoggle = (event) => {};
```

```html example-bad
<details ontoggle="console.log(this.open)" open>
...
</details>
<details ontoggle="console.log(this.open)" open>...</details>
```

> **Note:** In the example above the event listener will be called once without any user interaction because the `open` attribute is set. Using event handlers like this [is discouraged](/en-US/docs/Web/HTML/Attributes#event_handler_attributes).
Expand Down

0 comments on commit 28f16e1

Please sign in to comment.