Intercepting an HTML asset's [DONE] button let's you create any kind of cool tricks with HTML assets. You can have a popup message that says 'Goodbye' to the user, or any kind of reminder or message that pops up when when the user clicks the 'Done' button. You can also use it to jump to another asset, rather than just closing the asset. You can even check if a field of Form has been set to a certain value and trigger a different logic than closing the asset - e.g. fill out another form.
To implement this, add the following code to the nexti_metadata.json file
and intercept the 'close' function by running a script that uses window.onbeforeunload()
When property_html_brochureControlsClose is set to YES and an asset's [DONE] button is tapped, the callback is initiated allowing the asset to handle clean-up or similar before it is closed, followed by URI, which then closes the asset.