Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clarified code example: removed unnecessary button type (#38157)
The code example was misleading (Exhibit A: I was misled by it). How so: - The button type attribute is known to carry behavior w.r.t. its ancestor element (button.type=submit will submit a <form> etc. ; see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type ) - The documentation page is all about closing a <dialog> and raising the cancel event. - The presence of a <button type="reset"> in the example suggests that the type attribute does actually contribute to the button behavior w.r.t. the <dialog> - but it does nothing, the closing of the dialog is only the result of a click listener attached via script
- Loading branch information