LoginSignup
1

More than 5 years have passed since last update.

chrome extensionとjsonp

Last updated at Posted at 2014-06-18

callback関数が、extensionのsandbox側で定義されて、ページ本体で呼ぶ、
ってことになっちゃうので、chrome extensionではjsonp使えない。

(読み込んで、レスポンスのcallback関数実行したところで、function undefinedでエラーになる)

解決策

chrome extensionなら、
cross domainなxhrも使えるので、そっち使う。

参考

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1