mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-21 15:57:42 +00:00
The `loaduserinterface` and `unloaduserinterface` events were incompletely implemented, and the documentation was incomplete. This change: 1. ensures `loaduserinterface` is called any time a UI is set, either during initialization or when the property is set later. 2. ensures `unloaduserinterface` is called immediately before a UI is shutdown. 3. updates documentation 4. removes misleading commented code in kmwuifloat.ts Test-bot: skip
34 lines
651 B
Markdown
34 lines
651 B
Markdown
---
|
|
title: keyman.unloaduserinterface Event
|
|
---
|
|
|
|
## Summary
|
|
|
|
Called when a KeymanWeb UI is about to be unloaded.
|
|
|
|
## Syntax
|
|
|
|
```js
|
|
keyman.addEventListener('unloaduserinterface', function() {
|
|
...
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
None.
|
|
|
|
### Return Value
|
|
|
|
`boolean`
|
|
: `true` if the next event handler should be called, `false` if it should not.
|
|
Your event handler should return `true` aside from exceptional
|
|
circumstances.
|
|
|
|
## Description
|
|
|
|
Called when the ui is about to be unloaded, allowing cleanup of resources if
|
|
necessary.
|
|
|
|
It is not possible to stop the UI being unloaded; returning `false` only stops
|
|
further event handlers from being called.
|