Use the chrome.loginState API to read and monitor the login state.
Use the chrome.loginState API to read and monitor the login state. * available since Chrome 78 * https://developer.chrome.com/extensions/loginState
(get-profile-type)
Gets the type of the profile the extension is in.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/extensions/loginState#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/loginState#method-getProfileType.
Gets the type of the profile the extension is in. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/extensions/loginState#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/loginState#method-getProfileType.
(get-session-state)
Gets the current session state.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - https://developer.chrome.com/extensions/loginState#property-callback-result.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/extensions/loginState#method-getSessionState.
Gets the current session state. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - https://developer.chrome.com/extensions/loginState#property-callback-result. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/extensions/loginState#method-getSessionState.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.ext.login-state namespace.
Taps all valid non-deprecated events in chromex.ext.login-state namespace.
(tap-on-session-state-changed-events channel & args)
Dispatched when the session state changes. sessionState is the new session state.
Events will be put on the |channel| with signature [::on-session-state-changed [session-state]] where:
|session-state| - https://developer.chrome.com/extensions/loginState#property-onSessionStateChanged-sessionState.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/loginState#event-onSessionStateChanged.
Dispatched when the session state changes. sessionState is the new session state. Events will be put on the |channel| with signature [::on-session-state-changed [session-state]] where: |session-state| - https://developer.chrome.com/extensions/loginState#property-onSessionStateChanged-sessionState. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/extensions/loginState#event-onSessionStateChanged.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close