The oncancel property returns the onCancel event handler code on the current element.
Syntax
element.oncancel = functionRef;
Notes
The cancel event is raised when the user wants to cancel the given element.
Prevents the element from to spread, preventing any parent handlers from being notified of it.
Specifications
| Specification | Status | Comment |
|---|---|---|
| HTML Living Standard The definition of 'oncancel' in that specification. |
Living Standard |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Basic support | Chrome Full support Yes | Edge ? | Firefox No support No | IE ? | Opera ? | Safari ? | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android No support No | Opera Android ? | Safari iOS ? | Samsung Internet Android ? |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
Document Tags and Contributors
Last updated by:
fscholz,