getState

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

Syntax

js
let 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

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
getState

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support