Chrome.storage.managed doesn't seem to work in my kiosk app

I wrote a pretty simple app for kiosk kiosks. I want to provide a default url using a policy with chrome.storage.managed. According to the available documentation, the circuit might look something like this:

{
    "type": "object",
    "properties": {
        "DefaultUrl": {
            "title": "Default URL",
            "description": "The Default URL that will be loaded",
             "type": "string"
         }
      }
}

And then the text configuration file that you upload on the admin.google page will look like this (but this is a kind of assumption):

{
    "DefaultUrl": {
        "Value": "http://example.com"
    }
}

Next, I try to use this URL using the following code:

chrome.storage.managed.get('DefaultUrl', function (data) {            
        var url = data.DefaultUrl;
        /*if(url == undefined)
             url = "undefined url";*/

        //further code to proces the url
    }); 

, dict /, (1 ). if , url "undefined url", ( undefined)..

, , , console.log , , dev.

- , ? , , , , - .

, chrome Windows, "windows": ., , 1 , , , 2 ? .

+4

Source: https://habr.com/ru/post/1619358/


All Articles