getState

Returns the portal state as one of unknown, not_captive, unlocked_portal, or locked_portal.

Syntax

var state = browser.captivePortal.getState()

Return value

A Promise that is fulfilled with a string containing one of unknown, not_captive, unlocked_portal, or locked_portal.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxOperaFirefox for Android
getStateChrome No support NoEdge No support NoFirefox Full support 68Opera No support NoFirefox Android No support No

Legend

Full support Ā 
Full support
No support Ā 
No support