Background Scripts

Background scripts are running as long as extension is enabled in browser and executed once on each browser start.

Background scripts should be enumerated in background_scripts array of extension_info.json file.

You can use any JavaScript libraries in background scipts, just add appropriate file to background_scripts:

        "background_scripts": [

See API reference for list of available APIs.


alert function is not available in some browsers, use kango.console.log().


kango.console.log('Extension initialized');

// Handle browser button click
kango.ui.browserButton.addEventListener(kango.ui.browserButton.event.COMMAND, function(event) {
        var details = {
                method: 'GET',
                url: '',
                async: true,
                contentType: 'text'
        kango.xhr.send(details, function(data) {
                if (data.status == 200 && data.response != null) {
                        var text = data.response;
                else { // something went wrong
                        kango.console.log('something went wrong');