How I can set property to main window object from chrome.storage

89 Views Asked by At

I create a chrome extension with possibility to set options, I need to set some settings in options and save them in storage, after that set it to property of global object window of the document

but if I try to set like in function below, window object isn't changed

chrome.storage.sync.get({domain: ""}, (items) => {
    window.mySettings = {
      domain: items.domain,
    };
 });

how I can get values and then set it to property of the main window of the document

0

There are 0 best solutions below