Liking cljdoc? Tell your friends :D

chromex.ext.alarms

clj

Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future.

Use the chrome.alarms API to schedule code to run
periodically or at a specified time in the future.

  * available since Chrome 30
  * https://developer.chrome.com/extensions/alarms
raw docstring

api-tableclj

source

clearclj/smacro

(clear)
(clear name)

Clears the alarm with the given name.

|name| - The name of the alarm to clear. Defaults to the empty string.

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 [was-cleared] where:

|was-cleared| - https://developer.chrome.com/extensions/alarms#property-callback-wasCleared.

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/alarms#method-clear.

Clears the alarm with the given name.

  |name| - The name of the alarm to clear. Defaults to the empty string.

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 [was-cleared] where:

  |was-cleared| - https://developer.chrome.com/extensions/alarms#property-callback-wasCleared.

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/alarms#method-clear.
sourceraw docstring

clear*cljs

(clear* config name)
source

clear-allclj/smacro

(clear-all)

Clears all alarms.

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 [was-cleared] where:

|was-cleared| - https://developer.chrome.com/extensions/alarms#property-callback-wasCleared.

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/alarms#method-clearAll.

Clears all alarms.

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 [was-cleared] where:

  |was-cleared| - https://developer.chrome.com/extensions/alarms#property-callback-wasCleared.

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/alarms#method-clearAll.
sourceraw docstring

clear-all*cljs

(clear-all* config)
source

createclj/smacro

(create name alarm-info)

Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after 'now' without warning but won't actually cause the alarm to fire for at least 1 minute.To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.

|name| - Optional name to identify this alarm. Defaults to the empty string. |alarm-info| - Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.

https://developer.chrome.com/extensions/alarms#method-create.

Creates an alarm.  Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the
same name (or no name if none is specified), it will be cancelled and replaced by this alarm.In order to reduce the load on
the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more.  That
is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning.  when can be set
to less than 1 minute after 'now' without warning but won't actually cause the alarm to fire for at least 1 minute.To help
you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.

  |name| - Optional name to identify this alarm. Defaults to the empty string.
  |alarm-info| - Describes when the alarm should fire.  The initial time must be specified by either when or
                 delayInMinutes (but not both).  If periodInMinutes is set, the alarm will repeat every periodInMinutes
                 minutes after the initial event.  If neither when or delayInMinutes is set for a repeating alarm,
                 periodInMinutes is used as the default for delayInMinutes.

https://developer.chrome.com/extensions/alarms#method-create.
sourceraw docstring

create*cljs

(create* config name alarm-info)
source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

getclj/smacro

(get)
(get name)

Retrieves details about the specified alarm.

|name| - The name of the alarm to get. Defaults to the empty string.

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 [alarm] where:

|alarm| - https://developer.chrome.com/extensions/alarms#property-callback-alarm.

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/alarms#method-get.

Retrieves details about the specified alarm.

  |name| - The name of the alarm to get. Defaults to the empty string.

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 [alarm] where:

  |alarm| - https://developer.chrome.com/extensions/alarms#property-callback-alarm.

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/alarms#method-get.
sourceraw docstring

get*cljs

(get* config name)
source

get-allclj/smacro

(get-all)

Gets an array of all the alarms.

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 [alarms] where:

|alarms| - https://developer.chrome.com/extensions/alarms#property-callback-alarms.

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/alarms#method-getAll.

Gets an array of all the alarms.

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 [alarms] where:

  |alarms| - https://developer.chrome.com/extensions/alarms#property-callback-alarms.

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/alarms#method-getAll.
sourceraw docstring

get-all*cljs

(get-all* config)
source

on-alarm*cljs

(on-alarm* config channel & args)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.ext.alarms namespace.

Taps all valid non-deprecated events in chromex.ext.alarms namespace.
sourceraw docstring

tap-on-alarm-eventsclj/smacro

(tap-on-alarm-events channel & args)

Fired when an alarm has elapsed. Useful for event pages.

Events will be put on the |channel| with signature [::on-alarm [alarm]] where:

|alarm| - The alarm that has elapsed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/alarms#event-onAlarm.

Fired when an alarm has elapsed. Useful for event pages.

Events will be put on the |channel| with signature [::on-alarm [alarm]] where:

  |alarm| - The alarm that has elapsed.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/alarms#event-onAlarm.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close