OLD | NEW |
1 [ | 1 [ |
2 { | 2 { |
3 "namespace": "extension", | 3 "namespace": "extension", |
4 "unprivileged": true, | 4 "unprivileged": true, |
5 "types": [ | 5 "types": [ |
6 { | 6 { |
7 "id": "MessageSender", | 7 "id": "MessageSender", |
8 "type": "object", | 8 "type": "object", |
9 "description": "An object containing information about the script contex
t that sent a message or request.", | 9 "description": "An object containing information about the script contex
t that sent a message or request.", |
10 "properties": { | 10 "properties": { |
(...skipping 3800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3811 "name": "onDrop", | 3811 "name": "onDrop", |
3812 "type": "function", | 3812 "type": "function", |
3813 "description": "Fired when the user drops bookmarks on the document", | 3813 "description": "Fired when the user drops bookmarks on the document", |
3814 "parameters": [ | 3814 "parameters": [ |
3815 {"$ref": "BookmarkNodeData"} | 3815 {"$ref": "BookmarkNodeData"} |
3816 ] | 3816 ] |
3817 } | 3817 } |
3818 ] | 3818 ] |
3819 }, | 3819 }, |
3820 { | 3820 { |
| 3821 "namespace": "experimental.downloads", |
| 3822 "nodoc": "true", |
| 3823 "events": [ |
| 3824 { |
| 3825 "name": "onCreated", |
| 3826 "type": "function", |
| 3827 "unprivileged": true, |
| 3828 "description": "This event fires with the DownloadItem object when a dow
nload begins.", |
| 3829 "parameters": [ |
| 3830 {"$ref": "DownloadItem"} |
| 3831 ] |
| 3832 }, |
| 3833 { |
| 3834 "name": "onChanged", |
| 3835 "type": "function", |
| 3836 "unprivileged": true, |
| 3837 "description": "When any of a DownloadItem's properties except |bytesRec
eived| changes, this event fires with the download id and an object containing t
he properties that changed.", |
| 3838 "parameters": [ |
| 3839 {"$ref": "DownloadDelta"} |
| 3840 ] |
| 3841 }, |
| 3842 { |
| 3843 "name": "onErased", |
| 3844 "type": "function", |
| 3845 "unprivileged": true, |
| 3846 "description": "Fires with the download id when a download is erased fro
m history.", |
| 3847 "parameters": [ |
| 3848 {"type": "integer", "name": "downloadId"} |
| 3849 ] |
| 3850 } |
| 3851 ], |
| 3852 "properties": { |
| 3853 "STATE_IN_PROGRESS": { |
| 3854 "type": "string", |
| 3855 "value": "in_progress", |
| 3856 "description": "The download is currently receiving data from the server
." |
| 3857 }, |
| 3858 "STATE_INTERRUPTED": { |
| 3859 "type": "string", |
| 3860 "value": "interrupted", |
| 3861 "description": "An error broke the connection with the file host." |
| 3862 }, |
| 3863 "STATE_COMPLETE": { |
| 3864 "type": "string", |
| 3865 "value": "complete", |
| 3866 "description": "The download has completed." |
| 3867 }, |
| 3868 "DANGER_SAFE": { |
| 3869 "type": "string", |
| 3870 "value": "safe", |
| 3871 "description": "The file has been determined to present no known danger
to the user's computer." |
| 3872 }, |
| 3873 "DANGER_FILE": { |
| 3874 "type": "string", |
| 3875 "value": "file", |
| 3876 "description": "The download's filename is suspicious." |
| 3877 }, |
| 3878 "DANGER_URL": { |
| 3879 "type": "string", |
| 3880 "value": "url", |
| 3881 "description": "The download's URL is suspicious." |
| 3882 } |
| 3883 }, |
| 3884 "types": [ |
| 3885 { |
| 3886 "id": "DownloadItem", |
| 3887 "type": "object", |
| 3888 "description": "The state of a file as it is downloaded from the interne
t.", |
| 3889 "properties": { |
| 3890 "id": { |
| 3891 "type": "integer", |
| 3892 "description": "An identifier that is persistent across browser sess
ions." |
| 3893 }, |
| 3894 "url": { |
| 3895 "type": "string", |
| 3896 "description": "absolute URL" |
| 3897 }, |
| 3898 "filename": { |
| 3899 "type": "string", |
| 3900 "description": "absolute local path" |
| 3901 }, |
| 3902 "danger": { |
| 3903 "type": "string", |
| 3904 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", |
| 3905 "enum": ["safe", "file", "url"], |
| 3906 "optional": true |
| 3907 }, |
| 3908 "dangerAccepted": { |
| 3909 "type": "boolean", |
| 3910 "description": "true if the user has accepted the download's danger.
" |
| 3911 }, |
| 3912 "mime": { |
| 3913 "type": "string", |
| 3914 "description": "The file's MIME type." |
| 3915 }, |
| 3916 "startTime": { |
| 3917 "type": "integer", |
| 3918 "description": "Number of milliseconds between the unix epoch and wh
en this download began." |
| 3919 }, |
| 3920 "endTime": { |
| 3921 "type": "integer", |
| 3922 "description": "Number of milliseconds between the unix epoch and wh
en this download ended.", |
| 3923 "optional": true |
| 3924 }, |
| 3925 "state": { |
| 3926 "type": "string", |
| 3927 "description": "Indicates whether the download is progressing, inter
rupted, or complete.", |
| 3928 "enum": ["in_progress", "complete", "interrupted"] |
| 3929 }, |
| 3930 "paused": { |
| 3931 "type": "boolean", |
| 3932 "description": "true if the download has stopped reading data from t
he host, but kept the connection open." |
| 3933 }, |
| 3934 "error": { |
| 3935 "type": "integer", |
| 3936 "description": "Number indicating why a download was interrupted.", |
| 3937 "optional": true |
| 3938 }, |
| 3939 "bytesReceived": { |
| 3940 "type": "integer", |
| 3941 "description": "Number of bytes received so far from the host, witho
ut considering file compression." |
| 3942 }, |
| 3943 "totalBytes": { |
| 3944 "type": "integer", |
| 3945 "description": "Number of bytes in the whole file, without consideri
ng file compression, or -1 if unknown." |
| 3946 }, |
| 3947 "fileSize": { |
| 3948 "type": "integer", |
| 3949 "description": "Number of bytes in the whole file post-decompression
, or -1 if unknown." |
| 3950 } |
| 3951 } |
| 3952 }, |
| 3953 { |
| 3954 "id": "DownloadOptions", |
| 3955 "type": "object", |
| 3956 "properties": { |
| 3957 "url": { |
| 3958 "type": "string", |
| 3959 "description": "The URL to download.", |
| 3960 "minLength": 1 |
| 3961 }, |
| 3962 "filename": { |
| 3963 "type": "string", |
| 3964 "description": "A file path relative to the Downloads directory to c
ontain the downloaded file.", |
| 3965 "optional": true |
| 3966 }, |
| 3967 "saveAs": { |
| 3968 "type": "boolean", |
| 3969 "optional": true, |
| 3970 "description": "Use a file-chooser to allow the user to select a fil
ename." |
| 3971 }, |
| 3972 "method": { |
| 3973 "type": "string", |
| 3974 "description": "The HTTP method to use if the URL uses the HTTP[S] p
rotocol.", |
| 3975 "optional": true, |
| 3976 "enum": ["GET", "POST"] |
| 3977 }, |
| 3978 "headers": { |
| 3979 "$ref": "HttpHeaders", |
| 3980 "description": "Extra HTTP headers to send with the request if the U
RL uses the HTTP[s] protocol, restricted to those allowed by XMLHttpRequest.", |
| 3981 "optional": true |
| 3982 }, |
| 3983 "body": { |
| 3984 "type": "string", |
| 3985 "description": "post body", |
| 3986 "optional": true |
| 3987 } |
| 3988 } |
| 3989 }, |
| 3990 { |
| 3991 "id": "DownloadQuery", |
| 3992 "type": "object", |
| 3993 "description": "", |
| 3994 "properties": { |
| 3995 "query": { |
| 3996 "type": "string", |
| 3997 "description": "This space-separated string of search terms that may
be grouped using quotation marks limits results to downloads whose filename or
url contain all of the search terms that do not begin with a dash ‘-’ and none o
f the search terms that do begin with a dash.", |
| 3998 "optional": true |
| 3999 }, |
| 4000 "startedBefore": { |
| 4001 "type": "integer", |
| 4002 "description": "Limits results to downloads that started before the
given ms since the epoch.", |
| 4003 "optional": true |
| 4004 }, |
| 4005 "startedAfter": { |
| 4006 "type": "integer", |
| 4007 "description": "Limits results to downloads that started after the g
iven ms since the epoch.", |
| 4008 "optional": true |
| 4009 }, |
| 4010 "endedBefore": { |
| 4011 "type": "integer", |
| 4012 "description": "Limits results to downloads that ended before the gi
ven ms since the epoch.", |
| 4013 "optional": true |
| 4014 }, |
| 4015 "endedAfter": { |
| 4016 "type": "integer", |
| 4017 "description": "Limits results to downloads that ended after the giv
en ms since the epoch.", |
| 4018 "optional": true |
| 4019 }, |
| 4020 "totalBytesGreater": { |
| 4021 "type": "integer", |
| 4022 "description": "Limits results to downloads whose totalBytes is grea
ter than the given integer.", |
| 4023 "optional": true |
| 4024 }, |
| 4025 "totalBytesLess": { |
| 4026 "type": "integer", |
| 4027 "description": "Limits results to downloads whose totalBytes is less
than the given integer.", |
| 4028 "optional": true |
| 4029 }, |
| 4030 "filenameRegex": { |
| 4031 "type": "string", |
| 4032 "description": "Limits results to downloads whose filename matches t
he given regular expression.", |
| 4033 "optional": true |
| 4034 }, |
| 4035 "urlRegex": { |
| 4036 "type": "string", |
| 4037 "description": "Limits results to downloads whose url matches the gi
ven regular expression.", |
| 4038 "optional": true |
| 4039 }, |
| 4040 "limit": { |
| 4041 "type": "integer", |
| 4042 "optional": true, |
| 4043 "description": "Setting this integer limits the number of results. O
therwise, all matching DownloadItems will be returned." |
| 4044 }, |
| 4045 "orderBy": { |
| 4046 "type": "string", |
| 4047 "optional": true, |
| 4048 "description": "Setting this string to a DownloadItem property sorts
the DownloadItems prior to applying the above filters. For example, setting |or
derBy|=”startTime” sorts the DownloadItems by their start time in ascending orde
r. To specify descending order, prefix |orderBy| with a hyphen: “-startTime”." |
| 4049 }, |
| 4050 "id": { |
| 4051 "type": "integer", |
| 4052 "optional": true, |
| 4053 "description": "An identifier that is persistent across browser sess
ions." |
| 4054 }, |
| 4055 "url": { |
| 4056 "type": "string", |
| 4057 "optional": true, |
| 4058 "description": "absolute URL" |
| 4059 }, |
| 4060 "filename": { |
| 4061 "type": "string", |
| 4062 "optional": true, |
| 4063 "description": "absolute local path" |
| 4064 }, |
| 4065 "danger": { |
| 4066 "type": "string", |
| 4067 "description": "Indication of whether this download is thought to be
safe or known to be suspicious.", |
| 4068 "enum": ["safe", "file", "url"], |
| 4069 "optional": true |
| 4070 }, |
| 4071 "dangerAccepted": { |
| 4072 "type": "boolean", |
| 4073 "optional": true, |
| 4074 "description": "true if the user has accepted the download's danger.
" |
| 4075 }, |
| 4076 "mime": { |
| 4077 "type": "string", |
| 4078 "optional": true, |
| 4079 "description": "The file's MIME type." |
| 4080 }, |
| 4081 "startTime": { |
| 4082 "type": "integer", |
| 4083 "optional": true, |
| 4084 "description": "Number of milliseconds between the unix epoch and wh
en this download began." |
| 4085 }, |
| 4086 "endTime": { |
| 4087 "type": "integer", |
| 4088 "description": "Number of milliseconds between the unix epoch and wh
en this download ended.", |
| 4089 "optional": true |
| 4090 }, |
| 4091 "state": { |
| 4092 "type": "string", |
| 4093 "optional": true, |
| 4094 "description": "Indicates whether the download is progressing, inter
rupted, or complete.", |
| 4095 "enum": ["in_progress", "complete", "interrupted"] |
| 4096 }, |
| 4097 "paused": { |
| 4098 "type": "boolean", |
| 4099 "optional": true, |
| 4100 "description": "true if the download has stopped reading data from t
he host, but kept the connection open." |
| 4101 }, |
| 4102 "error": { |
| 4103 "type": "integer", |
| 4104 "description": "Number indicating why a download was interrupted.", |
| 4105 "optional": true |
| 4106 }, |
| 4107 "bytesReceived": { |
| 4108 "type": "integer", |
| 4109 "optional": true, |
| 4110 "description": "Number of bytes received so far from the host, witho
ut considering file compression." |
| 4111 }, |
| 4112 "totalBytes": { |
| 4113 "type": "integer", |
| 4114 "optional": true, |
| 4115 "description": "Number of bytes in the whole file, without consideri
ng file compression, or -1 if unknown." |
| 4116 }, |
| 4117 "fileSize": { |
| 4118 "type": "integer", |
| 4119 "optional": true, |
| 4120 "description": "Number of bytes in the whole file post-decompression
, or -1 if unknown." |
| 4121 } |
| 4122 } |
| 4123 }, |
| 4124 { |
| 4125 "id": "DownloadBooleanDiff", |
| 4126 "type": "object", |
| 4127 "description": "Encapsulates a change in a boolean DownloadItem field.", |
| 4128 "properties": { |
| 4129 "old": { |
| 4130 "type": "boolean", |
| 4131 "optional": true |
| 4132 }, |
| 4133 "new": { |
| 4134 "type": "boolean", |
| 4135 "optional": true |
| 4136 } |
| 4137 } |
| 4138 }, |
| 4139 { |
| 4140 "id": "DownloadIntegerDiff", |
| 4141 "type": "object", |
| 4142 "description": "Encapsulates a change in an integer DownloadItem field."
, |
| 4143 "properties": { |
| 4144 "old": { |
| 4145 "type": "integer", |
| 4146 "optional": true |
| 4147 }, |
| 4148 "new": { |
| 4149 "type": "integer", |
| 4150 "optional": true |
| 4151 } |
| 4152 } |
| 4153 }, |
| 4154 { |
| 4155 "id": "DownloadStringDiff", |
| 4156 "type": "object", |
| 4157 "description": "Encapsulates a change in a string DownloadItem field.", |
| 4158 "properties": { |
| 4159 "old": { |
| 4160 "type": "string", |
| 4161 "optional": true |
| 4162 }, |
| 4163 "new": { |
| 4164 "type": "string", |
| 4165 "optional": true |
| 4166 } |
| 4167 } |
| 4168 }, |
| 4169 { |
| 4170 "id": "DownloadDelta", |
| 4171 "type": "object", |
| 4172 "description": "Encapsulates a change in a DownloadItem.", |
| 4173 "properties": { |
| 4174 "id": { |
| 4175 "type": "integer", |
| 4176 "description": "An identifier that is persistent across browser sess
ions." |
| 4177 }, |
| 4178 "url": { |
| 4179 "$ref": "DownloadStringDiff", |
| 4180 "optional": true |
| 4181 }, |
| 4182 "filename": { |
| 4183 "$ref": "DownloadStringDiff", |
| 4184 "optional": true |
| 4185 }, |
| 4186 "danger": { |
| 4187 "$ref": "DownloadStringDiff", |
| 4188 "optional": true |
| 4189 }, |
| 4190 "dangerAccepted": { |
| 4191 "$ref": "DownloadBooleanDiff", |
| 4192 "optional": true |
| 4193 }, |
| 4194 "mime": { |
| 4195 "$ref": "DownloadStringDiff", |
| 4196 "optional": true |
| 4197 }, |
| 4198 "startTime": { |
| 4199 "$ref": "DownloadIntegerDiff", |
| 4200 "optional": true |
| 4201 }, |
| 4202 "endTime": { |
| 4203 "$ref": "DownloadIntegerDiff", |
| 4204 "optional": true |
| 4205 }, |
| 4206 "state": { |
| 4207 "$ref": "DownloadStringDiff", |
| 4208 "optional": true |
| 4209 }, |
| 4210 "paused": { |
| 4211 "$ref": "DownloadBooleanDiff", |
| 4212 "optional": true |
| 4213 }, |
| 4214 "error": { |
| 4215 "$ref": "DownloadIntegerDiff", |
| 4216 "optional": true |
| 4217 }, |
| 4218 "bytesReceived": { |
| 4219 "$ref": "DownloadIntegerDiff", |
| 4220 "optional": true |
| 4221 }, |
| 4222 "totalBytes": { |
| 4223 "$ref": "DownloadIntegerDiff", |
| 4224 "optional": true |
| 4225 }, |
| 4226 "fileSize": { |
| 4227 "$ref": "DownloadIntegerDiff", |
| 4228 "optional": true |
| 4229 } |
| 4230 } |
| 4231 }, |
| 4232 { |
| 4233 "id": "DownloadResponse", |
| 4234 "type": "object", |
| 4235 "nodoc": true, |
| 4236 "description": "This object is transformed into two callback parameters
for the callback to download().", |
| 4237 "properties": { |
| 4238 "id": {"type": "integer", "optional": true}, |
| 4239 "error": {"type": "integer", "optional": true} |
| 4240 } |
| 4241 } |
| 4242 ], |
| 4243 "functions": [ |
| 4244 { |
| 4245 "name": "download", |
| 4246 "type": "function", |
| 4247 "description": "Download a URL. If the URL uses the HTTP[S] protocol, th
en the request will include all cookies currently set for its hostname. If the d
ownload started successfully, |callback| will be called with the new DownloadIte
m’s |id| and |error|=undefined. If there was an error starting the download, the
n |callback| will be called with |downloadId|=undefined and an |error| code inte
ger. If the URL’s hostname is not specified in the |permissions| section of the
extension’s manifest, then the |error| object will indicate that the extension d
oes not have permission to access that hostname.", |
| 4248 "parameters": [ |
| 4249 {"$ref": "DownloadOptions"}, |
| 4250 { |
| 4251 "name": "callback", |
| 4252 "type": "function", |
| 4253 "optional": true, |
| 4254 "parameters": [ |
| 4255 {"$ref": "DownloadResponse"} |
| 4256 ] |
| 4257 } |
| 4258 ] |
| 4259 }, |
| 4260 { |
| 4261 "name": "search", |
| 4262 "type": "function", |
| 4263 "description": "Find DownloadItems. Set |query| to the empty object to g
et all DownloadItems. To get a specific DownloadItem, set only the |id| field.", |
| 4264 "parameters": [ |
| 4265 {"$ref": "DownloadQuery"}, |
| 4266 { |
| 4267 "name": "callback", |
| 4268 "type": "function", |
| 4269 "optional": true, |
| 4270 "parameters": [ |
| 4271 {"name": "items", "type": "array"} |
| 4272 ] |
| 4273 } |
| 4274 ] |
| 4275 }, |
| 4276 { |
| 4277 "name": "erase", |
| 4278 "type": "function", |
| 4279 "description": "Erase matching DownloadItems from history", |
| 4280 "parameters": [ |
| 4281 {"$ref": "DownloadQuery"}, |
| 4282 { |
| 4283 "name": "callback", |
| 4284 "type": "function", |
| 4285 "optional": true, |
| 4286 "parameters": [ |
| 4287 {"name": "ids", "type": "array"} |
| 4288 ] |
| 4289 } |
| 4290 ] |
| 4291 }, |
| 4292 { |
| 4293 "name": "setDestination", |
| 4294 "type": "function", |
| 4295 "description": "Move the file to Downloads/relativePath instead of the D
ownloads directory if it has completed and pass true to callback. If |relativePa
th| specifies a directory that does not exist then it will be created. If it has
not completed, store |relativePath| such that the file will be moved there when
it completes and pass true to callback without waiting for the download to comp
lete. Does nothing if the download is cancelled or if |downloadId| does not refe
rence an existing DownloadItem, but pass false to callback. If the file could no
t be moved, then the DownloadItem will transition to STATE_INTERRUPTED, its |err
or| property will be set accordingly, false will be passed to callback, and the
OnChanged event will fire.", |
| 4296 "parameters": [ |
| 4297 {"name": "id", "type": "integer"}, |
| 4298 {"name": "relativePath", "type": "string"} |
| 4299 ] |
| 4300 }, |
| 4301 { |
| 4302 "name": "acceptDanger", |
| 4303 "type": "function", |
| 4304 "description": "Accept a dangerous download. If a download is dangerous,
then it will not transition to the completed state until this function is calle
d.", |
| 4305 "parameters": [ |
| 4306 {"name": "id", "type": "integer"} |
| 4307 ] |
| 4308 }, |
| 4309 { |
| 4310 "name": "show", |
| 4311 "type": "function", |
| 4312 "description": "Show the downloaded file in its folder.", |
| 4313 "parameters": [ |
| 4314 {"name": "id", "type": "integer"} |
| 4315 ] |
| 4316 }, |
| 4317 { |
| 4318 "name": "drag", |
| 4319 "type": "function", |
| 4320 "description": "Drag the file to another application", |
| 4321 "parameters": [ |
| 4322 {"name": "id", "type": "integer"} |
| 4323 ] |
| 4324 }, |
| 4325 { |
| 4326 "name": "pause", |
| 4327 "type": "function", |
| 4328 "description": "Pause the download.", |
| 4329 "parameters": [ |
| 4330 {"name": "id", "type": "integer"} |
| 4331 ] |
| 4332 }, |
| 4333 { |
| 4334 "name": "resume", |
| 4335 "type": "function", |
| 4336 "description": "Resume a paused download.", |
| 4337 "parameters": [ |
| 4338 {"name": "id", "type": "integer"} |
| 4339 ] |
| 4340 }, |
| 4341 { |
| 4342 "name": "cancel", |
| 4343 "type": "function", |
| 4344 "description": "Cancel a download.", |
| 4345 "parameters": [ |
| 4346 {"name": "id", "type": "integer"} |
| 4347 ] |
| 4348 } |
| 4349 ] |
| 4350 }, |
| 4351 { |
3821 "namespace": "devtools", | 4352 "namespace": "devtools", |
3822 "nodoc": "true", | 4353 "nodoc": "true", |
3823 "types": [], | 4354 "types": [], |
3824 "functions": [ | 4355 "functions": [ |
3825 { | 4356 { |
3826 "name": "getTabEvents", | 4357 "name": "getTabEvents", |
3827 "type": "function", | 4358 "type": "function", |
3828 "description": "Experimental support for timeline API", | 4359 "description": "Experimental support for timeline API", |
3829 "nodoc": "true", | 4360 "nodoc": "true", |
3830 "parameters": [ | 4361 "parameters": [ |
(...skipping 3696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7527 "description": "A string result code. The value is non-empty on
success only in tests.", | 8058 "description": "A string result code. The value is non-empty on
success only in tests.", |
7528 "optional": "true" | 8059 "optional": "true" |
7529 } | 8060 } |
7530 ] | 8061 ] |
7531 } | 8062 } |
7532 ] | 8063 ] |
7533 } | 8064 } |
7534 ] | 8065 ] |
7535 } | 8066 } |
7536 ] | 8067 ] |
OLD | NEW |