captivePortal
Determine the captive portal state of the user’s connection. A captive portal is a web page displayed when a user first connects to a Wi-Fi network. The user provides information or acts on the captive portal web page to gain broader access to network resources, such as accepting terms and conditions or making a payment.
To use this API you need to have the "captivePortal" permission.
Properties
captivePortal.canonicalURL
- Return the canonical URL of the captive-portal detection page. Read-only.
Functions
captivePortal.getLastChecked()
- Returns the time, in milliseconds, since the last request was completed.
captivePortal.getState()
- Returns the portal state as one of
unknown
,not_captive
,unlocked_portal
, orlocked_portal
.
Events
captivePortal.onConnectivityAvailable
- Fires when the captive portal service determines that the user can connect to the internet.
captivePortal.onStateChanged
-
Fires when the captive portal state changes.
Browser compatibility
Report problems with this compatibility data on GitHubwebextensions-desktop | webextensions-mobile | |||||
---|---|---|---|---|---|---|
canonicalURL | ChromeNo supportNo | EdgeNo supportNo | FirefoxFull support72 | OperaNo supportNo | SafariNo supportNo | Firefox for AndroidNo supportNo |
getLastChecked | ChromeNo supportNo | EdgeNo supportNo | FirefoxFull support68 | OperaNo supportNo | SafariNo supportNo | Firefox for AndroidNo supportNo |
getState | ChromeNo supportNo | EdgeNo supportNo | FirefoxFull support68 | OperaNo supportNo | SafariNo supportNo | Firefox for AndroidNo supportNo |
onConnectivityAvailable | ChromeNo supportNo | EdgeNo supportNo | FirefoxFull support68 | OperaNo supportNo | SafariNo supportNo | Firefox for AndroidNo supportNo |
onStateChanged | ChromeNo supportNo | EdgeNo supportNo | FirefoxFull support68 | OperaNo supportNo | SafariNo supportNo | Firefox for AndroidNo supportNo |
Legend
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.