https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload
is
what you're looking for. It's not a Polymer feature.

On Wed, Sep 30, 2015 at 7:41 PM Phu Hiep DUONG <[email protected]>
wrote:

> Hello,
>
> How can we implement this feature in Polymer?
>
> [image: Inline images 2]
>
> (example from github wiki page editing)
>
> I suppose we have an application based on Polymer Starter Kit (so with
> page.js as router engine)
> - this application uses a *product-editor* element which contains a
> textbox + save button.
> - User is editing a product at the route *localhost/#!/product/127/edit*
> - and "accidently" click on the Back button or other links on the page
>
> I'd like to display the above confirmation dialog: "Are you sure you want
> to leave this page?"
>
> How can we do this?
>
> Thank you
>
>
>
>
> --
> /=================================================/
>         DUONG Phu Hiep
>         Tel: +33 6 68 19 61 34
> /=================================================/
>
> Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/CABO6%3DysOBxmfPghdgRZ4GXRJHXQPNWwWk%2BCc-S8K5p4bMf0pMQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/polymer-dev/CABO6%3DysOBxmfPghdgRZ4GXRJHXQPNWwWk%2BCc-S8K5p4bMf0pMQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CACGqRCAnooB5zUVbMhshwK%2BdjvyKudt2tTyqvJFnc2xKpte0Lw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to