native.cancelWebPopup()

Type Function
Library native.*
Return value none
Revision Release 2022.3683
Keywords web popup, web overlay
See also native.showWebPopup()
native.newWebView()

Overview

Dismisses the currently displaying web popup. This function takes no arguments because only one web popup can be shown at one time (not to be confused with native web views which can have multiple instances shown at once).

Syntax

native.cancelWebPopup()

Example

local options =
{
    hasBackground=false,
    baseUrl=system.DocumentsDirectory
}
native.showWebPopup( "localpage1.html", options )

-- close popup after 3 seconds
timer.performWithDelay( 3000, function() native.cancelWebPopup() end, 1 )