Returns the portal state as one of unknown
, not_captive
, unlocked_portal
, or locked_portal
.
var state = browser.captivePortal.getState()
A Promise that is fulfilled with a string containing one of unknown
, not_captive
, unlocked_portal
, or locked_portal
.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
getState |
No |
No |
68 |
? |
No |
No |
? |
? |
No |
? |
? |
? |
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/captivePortal/getState