spiegel-keyman/web/docs/engine/reference/util/detachDOMEvent.md
Marc Durdin 1f82507730 docs(web): deprecate unused and obsolete API endpoints and docs cleanup
Deprecate the following obsolete functions and properties:
* `keyman.helpURL`
* `keyman.util.rgba`
* `keyman.util.toFloat`
* `keyman.util.toNumber`
* `keyman.util.toNzString`

Use correct language for code blocks in Keyman Engine for Web
documentation.

Test-bot: skip
2026-08-12 16:07:22 +02:00

771 B

title
detachDOMEvent

Summary

Detach DOM event handler from element to prevent memory leaks.

Syntax

keyman.util.detachDOMEvent();

Parameters

Pelem
Type: Element
Element from which the event is being detached.
eventName
Type: string
The name of the event, without an 'on' prefix.
handler
Type: function(Object)
The event handler being detached.
useCapture
Type: boolean optional
Set this to true if the event was being captured in the bubbling phase; otherwise, use false or leave this parameter empty.

Return Value

undefined

Description

The fourth argument, useCapture, is optional and will default to false.

See also: keyman.util.attachDOMEvent