I want to detect Google Chrome kiosk mode. I am using this code to detect kiosk mode.

```
chrome.app.runtime.onLaunched.addListener(function (launchData) {

            alert("chrome");
            launchData.isKioskSession; //true or false
        });

```

I am getting this error.

**Uncaught TypeError: Cannot read property 'onLaunched' of undefined** 

Do I need to add some reference?