Cross-domain SVG content document in object tag

前端 未结 1 655
说谎
说谎 2021-01-28 05:18

Is it \'legal\' to have an SVG with a data in a foreign domain i.e. (data="//da86ge957603k.cloudfront.net/rails/grafitti_logo-f4e8238a87c979c0cf5b41481c982b71.svg"), a

1条回答
  •  无人共我
    2021-01-28 05:31

    It's documented here by w3c. In detail here for the object tag that you can't do cross domain access to the data of a tag except via CORS.

    There's a more readable distillation on MDN and to get round it you need to enable CORS on the remote site (if you can).

    0 讨论(0)
    提交回复
    热议问题