utils/dialog
Utility functions for dialogs
utils/dialog.observeDialogToggle(dialog, callback) ⇒ Object
Workaround for poor Safari support of the dialog 'toggle' event. Watches for changes to the 'open' attribute and fires a callback.
Kind: static method of utils/dialog
Returns: Object - Object with a destroy method to disconnect the observer
| Param | Type | Description |
|---|---|---|
| dialog | HTMLDialogElement |
The dialog element to observe |
| callback | function |
Function to call when the open state changes. Receives boolean indicating open state. |