Newer
Older
alert / js / node_modules / flarum / common / components / ConfirmDocumentUnload.d.ts
@Réz István Réz István on 18 Nov 2021 695 bytes first commit
/**
 * The `ConfirmDocumentUnload` component can be used to register a global
 * event handler that prevents closing the browser window/tab based on the
 * return value of a given callback prop.
 *
 * ### Attrs
 *
 * - `when` - a callback returning true when the browser should prompt for
 *            confirmation before closing the window/tab
 *
 * ### Children
 *
 * NOTE: Only the first child will be rendered. (Use this component to wrap
 * another component / DOM element.)
 *
 */
export default class ConfirmDocumentUnload extends Component<import("../Component").ComponentAttrs> {
    handler(): any;
    boundHandler: any;
    onremove(): void;
}
import Component from "../Component";