0

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?

Kara
  • 6,115
  • 16
  • 50
  • 57
  • Including more of your code will probably help making it answerable. – Xan May 11 '16 at 07:30
  • Finally managed to include the filepicker after reading [this](http://stackoverflow.com/questions/17161695/load-the-google-file-picker-in-a-chrome-extension) post. I created another site for the sole purpose of displaying the file picker and included that in a sandboxed iframe. – Erik van den Hoorn May 11 '16 at 20:56

0 Answers0