0

I am trying to load the google map inside my chrome extension using the following CSP defined in manifest.json

    "content_security_policy": "script-src 'self' 'unsafe-eval' https://maps.googleapis.com/ https://ssl.google-analytics.com; object-src 'self'"

It's working fine, now I converted my extension to Microsoft edge extension. and the overall code works except Content security policy block the resources download by google map. Below are the errors. Can anyone correct me if I'm doing wrong?

    CSP14312: Resource violated directive ‘script-src 'self'’ in Host Defined Policy: https://maps.googleapis.com/maps/api/js?key=ID. Resource will be blocked.

The error code didn't find any helpful resource.

Atif Hussain
  • 880
  • 12
  • 19

1 Answers1

1

I didn't find the correct solution till now. However, I found the Alternative approach to integrate the google map inside the Microsoft Edge extension. that Embed the iframe inside the extension.

    <iframe width="100%" height="100%" frameborder="0" style="border:0"src="https://www.google.com/maps/embed/v1/place?q=40.7127837,-74.0059413&;key=ID"></iframe>
Atif Hussain
  • 880
  • 12
  • 19