为什么在包含 React 脚本时使用关键字 crossorigin ?
和
如果我们不使用它会发生什么?
<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
Normal script elements pass minimal information to the window.onerror for scripts which do not pass the standard CORS checks. 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.
—MDN
关于javascript - 在脚本标签中 react 跨域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47103818/