Interface DialogContext

Index

Methods

Methods

public addHost(theDialog: Dialog): any

In this function, you are expected to add a DOM element to the tree which will serve as the "host" for the modal's composed view. You must add a property called host to the modalWindow object which references the dom element. It is this host which is passed to the composition module.

Parameters

  • theDialog: Dialog

    The dialog model.

Returns

any

public compositionComplete(child: HTMLElement, parent: HTMLElement, context: CompositionContext): any

This function is called after the modal is fully composed into the DOM, allowing your implementation to do any final modifications, such as positioning or animation. You can obtain the original dialog object by using getDialog on context.model.

Parameters

  • child: HTMLElement

    The dialog view.

  • parent: HTMLElement

    The parent view.

  • context: CompositionContext

    The composition context.

Returns

any

public removeHost(theDialog: Dialog): any

This function is expected to remove any DOM machinery associated with the specified dialog and do any other necessary cleanup.

Parameters

  • theDialog: Dialog

    The dialog model.

Returns

any