src/navigation.js
function presentModal(modal) {
    let doc = modal; // assume a document object is passed
    if (_.isString(modal)) { // if a modal document string is passed
        doc = Parser.dom(modal);
    } else if (_.isPlainObject(modal)) { // if a modal page configuration is passed
        doc = Page.makeDom(modal);
    }
    navigationDocument.presentModal(doc);
    modalDoc = doc;
    return doc;
}
function presentModal(modal) {
    let doc = modal; // assume a document object is passed
    if (_.isString(modal)) { // if a modal document string is passed
        doc = Parser.dom(modal);
    } else if (_.isPlainObject(modal)) { // if a modal page configuration is passed
        doc = Page.makeDom(modal);
    }
    navigationDocument.presentModal(doc);
    modalDoc = doc;
    return doc;
}
function presentModal ( modal ) { let doc = modal ; // assume a document object is passed if ( _ . isString ( modal ) ) { // if a modal document string is passed doc = Parser . dom ( modal ) ; } else if ( _ . isPlainObject ( modal ) ) { // if a modal page configuration is passed doc = Page . makeDom ( modal ) ; } navigationDocument . presentModal ( doc ) ; modalDoc = doc ; return doc ; }
Shows a modal. Closes the previous modal before showing a new modal.

@inner
@alias module:navigation.presentModal

@param  {Document|String|Object} modal       The TVML string/document representation of the modal window or a configuration object to create modal from
@return {Document}                           The created modal document
Shows a modal . Closes the previous modal before showing a new modal .