google-chrome-extension


Where can I see which chrome extensions API is valid for which chrome version


I love what chrome offers me through its extension API.
But I always find myself lost in the jungle of what API is supported by which chrome version and when did the last chrome.experimental feature make it into the supported extensions.
The Chrome extension page gives me a nice overview what is supported, but without mentioning since what version. The same is true for the experimental API overview. Is that specific API still experimental or is it already supported in canary, for example.
If I try a sample from the chrome Samples website I usually have to change some API calls from chrome.experimental.foo to chrome.foo or find out that it is not supported at all. (What happened to chrome.experimental.alarm?) That usually means to just use the trial and error approach to eliminate all errors, until the sample works.
tldr;
So, I'm wondering is there an overview page which tells me since what version, what API is supported or when it was decided to drop an experimental API. And if there is no such page, what is the recommended way or your personal approach to deal with this situation?
On this page, the process of generating the official documentation (automatically from the Chrome repository) is described. On the same page, you can also read how to retrieve documentation for older branches. Note that the documentation is somehow incomplete: Deprecated APIs are included immediately, although they're still existent (such as onRequest).
What's New in Extensions is a brief list of API changes and updates (excluding most of the experimental APIs). It has to be manually edited, so it's not always up-to-date. For example, the current stable version is 20, but the page's last entry is 19.
If you really need a single page containing all API changes, the following approach can be used:
First, install all Chrome versions. This is not time consuming when done automatically: I've written a script which automates the installation of Chrome, which duplicates a previous profile: see this answer.
Testing for the existence of the feature:
Write a manifest file which includes all permissions (unrecognised permissions are always ignored).
Chrome 18+: Duplicate the extension with manifest version 1 and 2. Some APIs are disabled in manifest version 1 (example).
Testing whether a feature is implemented and behaving as expected is very time-consuming. For this reason, you'd better test for the existence of an API.
A reasonable manner to do this is to recursively loop through the properties of chrome, and log the results (displayed to user / posted to a server).
The process of testing. Use one of the following methods:
Use a single Chrome profile, and start testing at the lowest version.
Use a separate profile for each Chrome version, so that you can test multiple Chrome versions side-by-side.
Post-processing: Interpret the results.
Example code to get information:
/**
* Returns a JSON-serializable object which shows all defined methods
* #param root Root, eg. chrome
* #param results Object, the result will look like {tabs:{get:'function'}}
*/
function getInfo(root, results) {
if (root == null) return results;
var keys = Object.keys(root), i, key;
results = results || {};
for (i=0; i<keys.length; i++) {
key = keys[i];
switch (typeof root[key]) {
case "function":
results[key] = 'function';
break;
case "object":
if (subtree instanceof Array) break; // Exclude arrays
var subtree = results[key] = {};
getInfo(root[key], subtree); // Recursion
break;
default:
/* Do you really want to know about primitives?
* ( Such as chrome.windows.WINDOW_ID_NONE ) */
}
}
return results;
}
/* Example: Get data, so that it can be saved for later use */
var dataToPostForLaterComparision = JSON.stringify(getInfo(chrome, {}));
// ...

Related Links

my extension keep getting rejected and i don't know why
Can I use an alias to release a chrome extension?
Chrome Extension - make a ribbon
Minimize developer tools window while debugging a chrome extension
Getting emulated mobile view of a temporarily changed html page
Google Chrome extension communicate with Panel
Chrome Extension error: “Unchecked runtime.lastError while running browserAction.setIcon: Icon invalid."
Listen to Keyboard and Mouse Chrome Hosted App
Is it possible to catch requests from another extension?
getSelection fails on top commercial websites, how to unblock?
Chrome extension to capture video of last few minutes of active tab
when I click the input autocomplete suggestion,the extension popup disappears[close] [duplicate]
RequireJS not loaing JavaScript in Firefox WebExtensions add-on
Secure the communication between Chrome extension and the sever
Are these permissions mandatory in my Chrome extension?
How to catch/listen for notification with chrome extension?

Categories

HOME
twitter
vbscript
netsuite
deezer
layout
react-router
framework7
v8
enterprise-library-5
podio
bs4
portia
adfs
vault
spring-tool-suite
ups
undefined
excel-vba-mac
jtextfield
orleans
functional-testing
excel-2007
wpfdatagrid
windows-error-reporting
bcd
galsim
android-nestedscrollview
wallpaper
catalog
wpf-controls
disassembling
document.write
ansible-playbook
leading-zero
galen
elmah
glew
android-mediaprojection
isbn
mime
segment
btrace
youcompleteme
hendrix
typescript1.8
yii2-extension
lowpass-filter
recursive-datastructures
jxcore
csound
ifs
crosswalk-runtime
nested-sets
grails-tomcat-plugin
home-directory
trash
transmitfile
fputcsv
python-stackless
whois
cloudbees
uid
rtbkit
cannon.js
metaclass
comobject
computer-algebra-systems
vstest.console.exe
unity3d-gui
bridge.net
angularjs-ng-click
phalanger
rdtsc
markers
flask-cors
p4java
expected-exception
xceed-datagrid
mbr
imdbpy
geos
ivyde
qt-faststart
mylyn
django-nonrel
smtp-auth
cassini-dev
path-separator
bitsharp
runas
uiviewanimation-curve
postgresql-performance
semantic-diff
stage
genshi
django-tagging
recent-documents
calling-convention
mongomapper
h.323
zend-tool
3gp

Resources

Encrypt Message