[英]React crossorigin in Script tag
Why is the keyword crossorigin used while including React Scripts ? 为什么在包含React Scripts时使用关键字crossorigin?
and 和
What happens if we dont use it ? 如果我们不使用它会怎样?
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
crossorigin
crossorigin
Normal script elements pass minimal information to the window.onerror for scripts which do not pass the standard CORS checks.普通脚本元素会将很少的信息传递给window.onerror,这些脚本不会通过标准的CORS检查。 To allow error logging for sites which use a separate domain for static media, use this attribute.
要允许对使用单独域的静态媒体进行站点的错误记录,请使用此属性。 See CORS settings attributes for a more descriptive explanation of the valid arguments.
请参阅CORS设置属性,以获取有关有效参数的更多描述性说明。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.