1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * @fileoverview Definitions for the Chromium extensions API used by ChromeVox.
22 chrome.extension = {};
25 /** @type {!Object|undefined} */
26 chrome.extension.lastError = {};
30 * @type {string|undefined}
32 chrome.extension.lastError.message;
35 /** @type {boolean|undefined} */
36 chrome.extension.inIncognitoContext;
40 * @param {string|Object.<string>=} opt_extensionIdOrConnectInfo Either the
41 * extensionId to connect to, in which case connectInfo params can be
42 * passed in the next optional argument, or the connectInfo params.
43 * @param {Object.<string>=} opt_connectInfo The connectInfo object,
44 * if arg1 was the extensionId to connect to.
45 * @return {Port} New port.
47 chrome.extension.connect = function(
48 opt_extensionIdOrConnectInfo, opt_connectInfo) {};
52 * @return {Window} The global JS object for the background page.
54 chrome.extension.getBackgroundPage = function() {};
58 * @param {string} path A path to a resource within an extension expressed
59 * relative to it's install directory.
60 * @return {string} The fully-qualified URL to the resource.
62 chrome.extension.getURL = function(path) {};
66 * @param {function(boolean): void} callback Callback function.
68 chrome.extension.isAllowedIncognitoAccess = function(callback) {};
72 * @param {string|*} extensionIdOrRequest Either the extensionId to send the
73 * request to, in which case the request is passed as the next arg, or the
75 * @param {*=} opt_request The request value, if arg1 was the extensionId.
76 * @param {function(*): void=} opt_callback The callback function which
77 * takes a JSON response object sent by the handler of the request.
79 chrome.extension.sendMessage = function(
80 extensionIdOrRequest, opt_request, opt_callback) {};
83 /** @type {ChromeEvent} */
84 chrome.extension.onConnect;
87 /** @type {ChromeEvent} */
88 chrome.extension.onConnectExternal;
91 /** @type {ChromeEvent} */
92 chrome.extension.onMessage;
101 /** @type {!Object|undefined} */
102 chrome.runtime.lastError = {};
106 * @type {string|undefined}
108 chrome.runtime.lastError.message;
111 /** @type {string} */
116 * @param {function(!Window=): void} callback Callback function.
118 chrome.runtime.getBackgroundPage = function(callback) {};
123 * Manifest information returned from chrome.runtime.getManifest. See
124 * http://developer.chrome.com/extensions/manifest.html. Note that there are
125 * several other fields not included here. They should be added to these externs
129 chrome.runtime.Manifest = function() {};
132 /** @type {string} */
133 chrome.runtime.Manifest.prototype.name;
136 /** @type {string} */
137 chrome.runtime.Manifest.prototype.version;
140 /** @type {number|undefined} */
141 chrome.runtime.Manifest.prototype.manifest_version;
144 /** @type {string|undefined} */
145 chrome.runtime.Manifest.prototype.description;
148 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
149 chrome.runtime.Manifest.prototype.oauth2;
154 * Oauth2 info in the manifest.
155 * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
158 chrome.runtime.Manifest.Oauth2 = function() {};
161 /** @type {string} */
162 chrome.runtime.Manifest.Oauth2.prototype.client_id;
164 /**@type {!Array.<string>} */
165 chrome.runtime.Manifest.Oauth2.prototype.scopes;
169 * http://developer.chrome.com/extensions/runtime.html#method-getManifest
170 * @return {!chrome.runtime.Manifest} The full manifest file of the app or
173 chrome.runtime.getManifest = function() {};
177 * @param {string} path A path to a resource within an extension expressed
178 * relative to it's install directory.
179 * @return {string} The fully-qualified URL to the resource.
181 chrome.runtime.getURL = function(path) {};
184 * @param {string|!Object.<string>=} opt_extensionIdOrConnectInfo Either the
185 * extensionId to connect to, in which case connectInfo params can be
186 * passed in the next optional argument, or the connectInfo params.
187 * @param {!Object.<string>=} opt_connectInfo The connectInfo object,
188 * if arg1 was the extensionId to connect to.
189 * @return {!Port} New port.
191 chrome.runtime.connect = function(
192 opt_extensionIdOrConnectInfo, opt_connectInfo) {};
196 * @param {string|*} extensionIdOrMessage Either the extensionId to send the
197 * message to, in which case the message is passed as the next arg, or the
199 * @param {(*|Object|function(*): void)=} opt_messageOrOptsOrCallback
201 * The message, if arg1 was the extensionId.
202 * The options for message sending, if arg1 was the message and this
203 * argument is not a function.
204 * The callback, if arg1 was the message and this argument is a function.
205 * @param {(Object|function(*): void)=} opt_optsOrCallback
206 * Either the options for message sending, if arg2 was the message,
208 * @param {function(*): void=} opt_callback The callback function which
209 * takes a JSON response object sent by the handler of the request.
211 chrome.runtime.sendMessage = function(
212 extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
218 * @param {function(!Object)} callback
220 chrome.runtime.getPlatformInfo = function(callback) {};
223 /** @type {!chrome.runtime.PortEvent} */
224 chrome.runtime.onConnect;
227 /** @type {!chrome.runtime.PortEvent} */
228 chrome.runtime.onConnectExternal;
231 /** @type {!chrome.runtime.MessageSenderEvent} */
232 chrome.runtime.onMessage;
235 /** @type {!chrome.runtime.MessageSenderEvent} */
236 chrome.runtime.onMessageExternal;
240 * Event whose listeners take a Port parameter.
243 chrome.runtime.PortEvent = function() {};
247 * @param {function(!Port): void} callback Callback.
249 chrome.runtime.PortEvent.prototype.addListener = function(callback) {};
253 * @param {function(!Port): void} callback Callback.
255 chrome.runtime.PortEvent.prototype.removeListener = function(callback) {};
259 * @param {function(!Port): void} callback Callback.
262 chrome.runtime.PortEvent.prototype.hasListener = function(callback) {};
268 chrome.runtime.PortEvent.prototype.hasListeners = function() {};
273 * Event whose listeners take a MessageSender and additional parameters.
276 chrome.runtime.MessageSenderEvent = function() {};
280 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
283 chrome.runtime.MessageSenderEvent.prototype.addListener = function(callback) {};
287 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
290 chrome.runtime.MessageSenderEvent.prototype.removeListener = function(callback)
295 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
299 chrome.runtime.MessageSenderEvent.prototype.hasListener = function(callback) {};
305 chrome.runtime.MessageSenderEvent.prototype.hasListeners = function() {};
315 * @param {number?} windowId Window Id.
316 * @param {Object?} options parameters of image capture, such as the format of
317 * the resulting image.
318 * @param {function(string): void} callback Callback function which accepts
319 * the data URL string of a JPEG encoding of the visible area of the
320 * captured tab. May be assigned to the 'src' property of an HTML Image
321 * element for display.
323 chrome.tabs.captureVisibleTab = function(windowId, options, callback) {};
327 * @param {number} tabId Tab Id.
328 * @param {Object.<string>=} opt_connectInfo Info Object.
330 chrome.tabs.connect = function(tabId, opt_connectInfo) {};
334 * @param {Object} createProperties Info object.
335 * @param {function(Tab): void=} opt_callback The callback function.
337 chrome.tabs.create = function(createProperties, opt_callback) {};
341 * @param {number?} tabId Tab id.
342 * @param {function(string): void} callback Callback function.
344 chrome.tabs.detectLanguage = function(tabId, callback) {};
348 * @param {number?} tabId Tab id.
349 * @param {Object?} details An object which may have 'code', 'file',
350 * or 'allFrames' keys.
351 * @param {function(): void=} opt_callback Callback function.
353 chrome.tabs.executeScript = function(tabId, details, opt_callback) {};
357 * @param {number} tabId Tab id.
358 * @param {function(Tab): void} callback Callback.
360 chrome.tabs.get = function(tabId, callback) {};
364 * Note: as of 2012-04-12, this function is no longer documented on
365 * the public web pages, but there are still existing usages
367 * @param {number?} windowId Window id.
368 * @param {function(Array.<Tab>): void} callback Callback.
370 chrome.tabs.getAllInWindow = function(windowId, callback) {};
374 * @param {function(Tab): void} callback Callback.
376 chrome.tabs.getCurrent = function(callback) {};
380 * Note: as of 2012-04-12, this function is no longer documented on
381 * the public web pages, but there are still existing usages.
383 * @param {number?} windowId Window id.
384 * @param {function(Tab): void} callback Callback.
386 chrome.tabs.getSelected = function(windowId, callback) {};
390 * @param {Object.<string, (number|Array.<number>)>} highlightInfo
391 * An object with 'windowId' (number) and 'tabs'
392 * (number or array of numbers) keys.
393 * @param {function(Window): void} callback Callback function invoked
394 * with each appropriate Window.
396 chrome.tabs.highlight = function(highlightInfo, callback) {};
400 * @param {number?} tabId Tab id.
401 * @param {Object?} details An object which may have 'code', 'file',
402 * or 'allFrames' keys.
403 * @param {function(): void=} opt_callback Callback function.
405 chrome.tabs.insertCSS = function(tabId, details, opt_callback) {};
409 * @param {number} tabId Tab id.
410 * @param {Object.<string, number>} moveProperties An object with 'index'
411 * and optional 'windowId' keys.
412 * @param {function(Tab): void=} opt_callback Callback.
414 chrome.tabs.move = function(tabId, moveProperties, opt_callback) {};
418 * @param {Object.<string, (number|string)>} queryInfo An object which may have
419 * 'active', 'pinned', 'highlighted', 'status', 'title', 'url', 'windowId',
420 * and 'windowType' keys.
421 * @param {function(Array.<Tab>): void=} opt_callback Callback.
422 * @return {!Array.<Tab>}
424 chrome.tabs.query = function(queryInfo, opt_callback) {};
428 * @param {number=} opt_tabId Tab id.
429 * @param {Object.<string, boolean>=} opt_reloadProperties An object which
430 * may have a 'bypassCache' key.
431 * @param {function(): void=} opt_callback The callback function invoked
432 * after the tab has been reloaded.
434 chrome.tabs.reload = function(opt_tabId, opt_reloadProperties, opt_callback) {};
438 * @param {number|Array.<number>} tabIds A tab ID or an array of tab IDs.
439 * @param {function(Tab): void=} opt_callback Callback.
441 chrome.tabs.remove = function(tabIds, opt_callback) {};
445 * @param {number} tabId Tab id.
446 * @param {*} request The request value of any type.
447 * @param {function(*): void=} opt_callback The callback function which
448 * takes a JSON response object sent by the handler of the request.
450 chrome.tabs.sendMessage = function(tabId, request, opt_callback) {};
454 * @param {number} tabId Tab id.
455 * @param {*} request The request value of any type.
456 * @param {function(*): void=} opt_callback The callback function which
457 * takes a JSON response object sent by the handler of the request.
459 chrome.tabs.sendRequest = function(tabId, request, opt_callback) {};
463 * @param {number} tabId Tab id.
464 * @param {Object.<string, (string|boolean)>} updateProperties An object which
465 * may have 'url' or 'selected' key.
466 * @param {function(Tab): void=} opt_callback Callback.
468 chrome.tabs.update = function(tabId, updateProperties, opt_callback) {};
471 /** @type {ChromeEvent} */
472 chrome.tabs.onActiveChanged;
475 /** @type {ChromeEvent} */
476 chrome.tabs.onActivated;
479 /** @type {ChromeEvent} */
480 chrome.tabs.onAttached;
483 /** @type {ChromeEvent} */
484 chrome.tabs.onCreated;
487 /** @type {ChromeEvent} */
488 chrome.tabs.onDetached;
491 /** @type {ChromeEvent} */
492 chrome.tabs.onHighlightChanged;
495 /** @type {ChromeEvent} */
499 /** @type {ChromeEvent} */
500 chrome.tabs.onRemoved;
503 /** @type {ChromeEvent} */
504 chrome.tabs.onUpdated;
507 /** @type {ChromeEvent} */
508 chrome.tabs.onReplaced;
517 * @param {Object=} opt_createData May have many keys to specify parameters.
519 * @param {function(ChromeWindow): void=} opt_callback Callback.
521 chrome.windows.create = function(opt_createData, opt_callback) {};
525 * @param {number} id Window id.
526 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
527 * @param {function(!ChromeWindow): void=} opt_callback Callback when
528 * opt_getInfo is an object.
530 chrome.windows.get = function(id, opt_getInfo, opt_callback) {};
534 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
535 * @param {function(!Array.<!ChromeWindow>): void=} opt_callback Callback.
537 chrome.windows.getAll = function(opt_getInfo, opt_callback) {};
541 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
542 * @param {function(ChromeWindow): void=} opt_callback Callback.
544 chrome.windows.getCurrent = function(opt_getInfo, opt_callback) { };
548 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
549 * @param {function(ChromeWindow): void=} opt_callback Callback.
551 chrome.windows.getLastFocused = function(opt_getInfo, opt_callback) { };
555 * @param {number} tabId Tab Id.
556 * @param {function(): void=} opt_callback Callback.
558 chrome.windows.remove = function(tabId, opt_callback) {};
562 * @param {number} tabId Tab Id.
563 * @param {Object} updateProperties An object which may have many keys for
565 * @param {function(): void=} opt_callback Callback.
567 chrome.windows.update = function(tabId, updateProperties, opt_callback) {};
570 /** @type {ChromeEvent} */
571 chrome.windows.onCreated;
574 /** @type {ChromeEvent} */
575 chrome.windows.onFocusChanged;
578 /** @type {ChromeEvent} */
579 chrome.windows.onRemoved;
585 chrome.windows.WINDOW_ID_NONE;
591 chrome.windows.WINDOW_ID_CURRENT;
601 * @param {function(Array.<string>): void} callback The callback function which
602 * accepts an array of the accept languages of the browser, such as
603 * 'en-US','en','zh-CN'.
605 chrome.i18n.getAcceptLanguages = function(callback) {};
609 * @param {string} messageName
610 * @param {(string|Array.<string>)=} opt_args
613 chrome.i18n.getMessage = function(messageName, opt_args) {};
617 * Chrome Text-to-Speech API.
625 * An event from the TTS engine to communicate the status of an utterance.
628 function TtsEvent() {}
631 /** @type {string} */
632 TtsEvent.prototype.type;
635 /** @type {number} */
636 TtsEvent.prototype.charIndex;
639 /** @type {string} */
640 TtsEvent.prototype.errorMessage;
645 * A description of a voice available for speech synthesis.
648 function TtsVoice() {}
651 /** @type {string} */
652 TtsVoice.prototype.voiceName;
655 /** @type {string} */
656 TtsVoice.prototype.lang;
659 /** @type {string} */
660 TtsVoice.prototype.gender;
663 /** @type {string} */
664 TtsVoice.prototype.extensionId;
667 /** @type {Array.<string>} */
668 TtsVoice.prototype.eventTypes;
672 * Gets an array of all available voices.
673 * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
676 chrome.tts.getVoices = function(opt_callback) {};
680 * Checks if the engine is currently speaking.
681 * @param {function(boolean)=} opt_callback The callback function.
683 chrome.tts.isSpeaking = function(opt_callback) {};
687 * Speaks text using a text-to-speech engine.
688 * @param {string} utterance The text to speak, either plain text or a complete,
689 * well-formed SSML document. Speech engines that do not support SSML will
690 * strip away the tags and speak the text. The maximum length of the text is
692 * @param {Object=} opt_options The speech options.
693 * @param {function()=} opt_callback Called right away, before speech finishes.
695 chrome.tts.speak = function(utterance, opt_options, opt_callback) {};
699 * Stops any current speech.
701 chrome.tts.stop = function() {};
711 * @param {Object.<string, string>} details Object with a 'url' key.
713 chrome.history.addUrl = function(details) {};
717 * @param {function(): void} callback Callback function.
719 chrome.history.deleteAll = function(callback) {};
723 * @param {Object.<string, string>} range Object with 'startTime'
724 * and 'endTime' keys.
725 * @param {function(): void} callback Callback function.
727 chrome.history.deleteRange = function(range, callback) {};
731 * @param {Object.<string, string>} details Object with a 'url' key.
733 chrome.history.deleteUrl = function(details) {};
737 * @param {Object.<string, string>} details Object with a 'url' key.
738 * @param {function(!Array.<!VisitItem>): void} callback Callback function.
739 * @return {!Array.<!VisitItem>}
741 chrome.history.getVisits = function(details, callback) {};
745 * @param {Object.<string, string>} query Object with a 'text' (string)
746 * key and optional 'startTime' (number), 'endTime' (number) and
748 * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
749 * @return {!Array.<!HistoryItem>}
751 chrome.history.search = function(query, callback) {};
754 /** @type {ChromeEvent} */
755 chrome.history.onVisitRemoved;
758 /** @type {ChromeEvent} */
759 chrome.history.onVisited;
765 chrome.permissions = {};
770 * permissions: (Array.<string>|undefined),
771 * origins: (Array.<string>|undefined)
773 * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
775 chrome.permissions.Permissions;
779 * @param {!chrome.permissions.Permissions} permissions
780 * @param {function(boolean): void} callback Callback function.
782 chrome.permissions.contains = function(permissions, callback) {};
786 * @param {function(!chrome.permissions.Permissions): void} callback
789 chrome.permissions.getAll = function(callback) {};
793 * @param {!chrome.permissions.Permissions} permissions
794 * @param {function(boolean): void=} opt_callback Callback function.
796 chrome.permissions.remove = function(permissions, opt_callback) {};
800 * @param {!chrome.permissions.Permissions} permissions
801 * @param {function(boolean): void=} opt_callback Callback function.
803 chrome.permissions.request = function(permissions, opt_callback) {};
806 /** @type {!ChromeEvent} */
807 chrome.permissions.onAdded;
810 /** @type {!ChromeEvent} */
811 chrome.permissions.onRemoved;
820 * @param {string} level A string describing the degree to which power
821 * management should be disabled, should be either "system" or "display".
823 chrome.power.requestKeepAwake = function(level) {};
827 * Releases a request previously made via requestKeepAwake().
829 chrome.power.releaseKeepAwake = function() {};
838 /** @type {number} */
842 /** @type {number} */
846 /** @type {number} */
847 Tab.prototype.windowId;
850 /** @type {number} */
851 Tab.prototype.openerTabId;
854 /** @type {boolean} */
855 Tab.prototype.highlighted;
858 /** @type {boolean} */
859 Tab.prototype.active;
862 /** @type {boolean} */
863 Tab.prototype.pinned;
866 /** @type {string} */
870 /** @type {string} */
874 /** @type {string} */
875 Tab.prototype.favIconUrl;
878 /** @type {string} */
879 Tab.prototype.status;
882 /** @type {boolean} */
883 Tab.prototype.incognito;
890 function ChromeWindow() {}
893 /** @type {number} */
894 ChromeWindow.prototype.id;
897 /** @type {boolean} */
898 ChromeWindow.prototype.focused;
901 /** @type {number} */
902 ChromeWindow.prototype.top;
905 /** @type {number} */
906 ChromeWindow.prototype.left;
909 /** @type {number} */
910 ChromeWindow.prototype.width;
913 /** @type {number} */
914 ChromeWindow.prototype.height;
917 /** @type {Array.<Tab>} */
918 ChromeWindow.prototype.tabs;
921 /** @type {boolean} */
922 ChromeWindow.prototype.incognito;
925 /** @type {string} */
926 ChromeWindow.prototype.type;
929 /** @type {string} */
930 ChromeWindow.prototype.state;
933 /** @type {boolean} */
934 ChromeWindow.prototype.alwaysOnTop;
941 function ChromeEvent() {}
944 /** @param {Function} callback */
945 ChromeEvent.prototype.addListener = function(callback) {};
948 /** @param {Function} callback */
949 ChromeEvent.prototype.removeListener = function(callback) {};
953 * @param {Function} callback
956 ChromeEvent.prototype.hasListener = function(callback) {};
959 /** @return {boolean} */
960 ChromeEvent.prototype.hasListeners = function(callback) {};
969 /** @type {string} */
973 /** @type {ChromeEvent} */
974 Port.prototype.onDisconnect;
977 /** @type {ChromeEvent} */
978 Port.prototype.onMessage;
981 /** @type {MessageSender} */
982 Port.prototype.sender;
986 * @param {Object.<string>} obj Message object.
988 Port.prototype.postMessage = function(obj) {};
992 * Note: as of 2012-04-12, this function is no longer documented on
993 * the public web pages, but there are still existing usages.
995 Port.prototype.disconnect = function() {};
1002 function MessageSender() {}
1005 /** @type {!Tab|undefined} */
1006 MessageSender.prototype.tab;
1009 /** @type {string|undefined} */
1010 MessageSender.prototype.id;
1013 /** @type {string|undefined} */
1014 MessageSender.prototype.url;
1017 /** @type {string|undefined} */
1018 MessageSender.prototype.tlsChannelId;
1025 function BookmarkTreeNode() {}
1028 /** @type {string} */
1029 BookmarkTreeNode.prototype.id;
1032 /** @type {string} */
1033 BookmarkTreeNode.prototype.parentId;
1036 /** @type {number} */
1037 BookmarkTreeNode.prototype.index;
1040 /** @type {string} */
1041 BookmarkTreeNode.prototype.url;
1044 /** @type {string} */
1045 BookmarkTreeNode.prototype.title;
1048 /** @type {number} */
1049 BookmarkTreeNode.prototype.dateAdded;
1052 /** @type {number} */
1053 BookmarkTreeNode.prototype.dateGroupModified;
1056 /** @type {Array.<BookmarkTreeNode>} */
1057 BookmarkTreeNode.prototype.children;
1064 function Cookie() {}
1067 /** @type {string} */
1068 Cookie.prototype.name;
1071 /** @type {string} */
1072 Cookie.prototype.value;
1075 /** @type {string} */
1076 Cookie.prototype.domain;
1079 /** @type {boolean} */
1080 Cookie.prototype.hostOnly;
1083 /** @type {string} */
1084 Cookie.prototype.path;
1087 /** @type {boolean} */
1088 Cookie.prototype.secure;
1091 /** @type {boolean} */
1092 Cookie.prototype.httpOnly;
1095 /** @type {boolean} */
1096 Cookie.prototype.session;
1099 /** @type {number} */
1100 Cookie.prototype.expirationDate;
1103 /** @type {string} */
1104 Cookie.prototype.storeId;
1111 function Debuggee() {}
1114 /** @type {number} */
1115 Debuggee.prototype.tabId;
1121 function HistoryItem() {}
1124 /** @type {string} */
1125 HistoryItem.prototype.id;
1128 /** @type {string} */
1129 HistoryItem.prototype.url;
1132 /** @type {string} */
1133 HistoryItem.prototype.title;
1136 /** @type {number} */
1137 HistoryItem.prototype.lastVisitTime;
1140 /** @type {number} */
1141 HistoryItem.prototype.visitCount;
1144 /** @type {number} */
1145 HistoryItem.prototype.typedCount;
1152 function VisitItem() {}
1155 /** @type {string} */
1156 VisitItem.prototype.id;
1159 /** @type {string} */
1160 VisitItem.prototype.visitId;
1163 /** @type {number} */
1164 VisitItem.prototype.visitTime;
1167 /** @type {string} */
1168 VisitItem.prototype.referringVisitId;
1171 /** @type {string} */
1172 VisitItem.prototype.transition;
1178 chrome.storage = {};
1184 chrome.storage.local = {};
1188 * @param {string|!Object|null} keys
1189 * @param {function(Object, string)} callback
1191 chrome.storage.local.get = function(keys, callback) {};
1195 * @param {Object} items
1196 * @param {function()=} opt_callback
1198 chrome.storage.local.set = function(items, opt_callback) {};
1202 * @param {string|!Object|null} keys
1203 * @param {function()=} opt_callback
1205 chrome.storage.local.remove = function(keys, opt_callback) {};
1209 * @type {ChromeEvent}
1211 chrome.storage.onChanged;