Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
©2012 Google
You must declare the "idle" permission in your extension's manifest to use the idle API. For example:
{ "name": "My extension", ... "permissions": [ "idle" ], ... }
Returns the current state of the browser.
The callback parameter should specify a function that looks like this:
function(enumerated string ["active""idle""locked"] newState) {...};