You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: declarations/src/main/kotlin/alarms/alarms.kt
+18-24Lines changed: 18 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -3,40 +3,34 @@ package alarms
3
3
importkotlin.js.Promise
4
4
importwebextensions.Event
5
5
6
+
/**
7
+
* @param name Name of this alarm.
8
+
* @param scheduledTime Time when the alarm is scheduled to fire, in milliseconds past the epoch.
9
+
* @param periodInMinutes When present, signals that the alarm triggers periodically after so many minutes.
10
+
*/
6
11
classAlarm(
7
-
/**
8
-
* Name of this alarm.
9
-
*/
10
-
varname:String,
11
-
/**
12
-
* Time when the alarm is scheduled to fire, in milliseconds past the epoch.
13
-
*/
14
-
varscheduledTime:Int,
15
-
/**
16
-
* When present, signals that the alarm triggers periodically after so many minutes.
17
-
*/
18
-
varperiodInMinutes:Int? = null
12
+
varname:String,
13
+
varscheduledTime:Float,
14
+
varperiodInMinutes:Float? = null
19
15
)
20
16
21
17
/**
22
18
* Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes.
19
+
* @param when Time when the alarm is scheduled to first fire, in milliseconds past the epoch.
20
+
* @param delayInMinutes Number of minutes from the current time after which the alarm should first fire.
21
+
* @param periodInMinutes Number of minutes after which the alarm should recur repeatedly.
23
22
*/
24
23
classAlarmInfo(
25
-
/**
26
-
* Time when the alarm is scheduled to first fire, in milliseconds past the epoch.
27
-
*/
28
-
var `when`: Int? = null,
29
-
/**
30
-
* Number of minutes from the current time after which the alarm should first fire.
31
-
*/
32
-
vardelayInMinutes:Int? = null,
33
-
/**
34
-
* Number of minutes after which the alarm should recur repeatedly.
35
-
*/
36
-
varperiodInMinutes:Int? = null
24
+
var `when`: Float? = null,
25
+
vardelayInMinutes:Float? = null,
26
+
varperiodInMinutes:Float? = null
37
27
)
38
28
39
29
externalclassAlarmsNamespace {
30
+
/**
31
+
* Fired when an alarm has expired. Useful for transient background pages.
* A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.
16
+
* @param id The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
17
+
* @param parentId The <code>id</code> of the parent folder. Omitted for the root node.
18
+
* @param index The 0-based position of this node within its parent folder.
19
+
* @param url The URL navigated to when a user clicks the bookmark. Omitted for folders.
20
+
* @param title The text displayed for the node.
21
+
* @param dateAdded When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).
22
+
* @param dateGroupModified When the contents of this folder last changed, in milliseconds since the epoch.
23
+
* @param unmodifiable Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
24
+
* @param type Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or separator.
25
+
* @param children An ordered list of children of this node.
16
26
*/
17
27
classBookmarkTreeNode(
18
-
/**
19
-
* The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.
20
-
*/
21
-
varid:String,
22
-
/**
23
-
* The <code>id</code> of the parent folder. Omitted for the root node.
24
-
*/
25
-
varparentId:String? = null,
26
-
/**
27
-
* The 0-based position of this node within its parent folder.
28
-
*/
29
-
varindex:Int? = null,
30
-
/**
31
-
* The URL navigated to when a user clicks the bookmark. Omitted for folders.
32
-
*/
33
-
varurl:String? = null,
34
-
/**
35
-
* The text displayed for the node.
36
-
*/
37
-
vartitle:String,
38
-
/**
39
-
* When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).
40
-
*/
41
-
vardateAdded:Int? = null,
42
-
/**
43
-
* When the contents of this folder last changed, in milliseconds since the epoch.
44
-
*/
45
-
vardateGroupModified:Int? = null,
46
-
/**
47
-
* Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
val onCreated:Event<(id:String, bookmark:BookmarkTreeNode) ->Unit>
126
101
102
+
/**
103
+
* Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.
104
+
*
105
+
* @param id null
106
+
* @param removeInfo null */
127
107
val onRemoved:Event<(id:String, removeInfo:RemoveInfo) ->Unit>
128
108
109
+
/**
110
+
* Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.
111
+
*
112
+
* @param id null
113
+
* @param changeInfo null */
129
114
val onChanged:Event<(id:String, changeInfo:ChangeInfo) ->Unit>
130
115
116
+
/**
117
+
* Fired when a bookmark or folder is moved to a different parent folder.
118
+
*
119
+
* @param id null
120
+
* @param moveInfo null */
131
121
val onMoved:Event<(id:String, moveInfo:MoveInfo) ->Unit>
0 commit comments