furo-lock-navigation #
@furo/route v2.6.13
import '@furo/route/src/furo-lock-navigation.js';
exports FuroLockNavigation js
exports <furo-lock-navigation>
custom-element-definition
superclass LitElement
mixes FBP
summary Blocks the furo-location-updater from navigating away
furo-lock-navigation
Blocks the furo-location-updater and furo-app-flow-router from navigating away if you have unsaved changes or work to do.
This component also adds a listener to the unload event, which kicks in at a reload or close of the window.
|
|
Attributes and Properties #
message #
message
string
default: 'You have unsaved changes, proceed anyway?'
The warning message, which is displayed at the prompt.
Events #
furo-navigation-locked #
at-furo-navigation-locked
→ void
Fired when the navigation was locked
furo-navigation-unlocked #
at-furo-navigation-unlocked
→ void
Fired when the navigation was unlocked
Methods #
lock #
lock() ⟹ void
*
→
fn-lock
Blocks furo-location-updater and furo-app-flow-router from navigating away.
unlock #
unlock() ⟹ void
*
→
fn-unlock
Removes the lock.