I am trying to include a Google Drive Picker in a chrome extension. I followed this guide to build the chromes extension: https://developer.chrome.com/extensions/getstarted
And this guide to build the picker: https://developers.google.com/picker/docs/
I used .setOrigin()
to set the origin to the URL of the chrome extension. However the target origin provided remains https://docs.google.com and I get the following error:
cb=gapi.loaded_0:80 Failed to execute 'postMessage' on 'DOMWindow':
The target origin provided ('https://docs.google.com') does not match the recipient window's origin ('chrome-extension://<EXTENSION ID>').
What am I doing wrong here?