我试图支持跨浏览器兼容性,但功能包括()不受IE(Internet Explorer)支持。有谁知道这是为什么?为什么Internet Explorer不支持includes()?
1
A
回答
2
Array.prototype.includes
和String.prototype.includes
分别是ES7 (now ES2017)和ES6 (now ES2015) javascript规范的一部分。
Internet Explorer的...是一个停产系列图形Web浏览器
关键词:停产。微软现在只开发Edge。 IE浏览器仍然可以获取安全更新,但不会再收到新的JavaScript更新或任何浏览器规范更新。
includes()
是无法在Internet Explorer支持,你能解释我为什么?
Internet Explorer不支持Array.prototype.includes
或String.prototype.includes
,因为Microsoft不再开发IE。这些规格是在微软停止使用IE之后发布的,因此它不会获得这些功能。
别急
您仍然可以通过使用polyfills使用旧的浏览器新的JavaScript。可以使用core-js作为polyfills的库。
要在IE中使用includes(...)
,只需在您的<head>
的顶部包含此项,然后再使用任何脚本。
<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.4.1/core.min.js"></script>
相关问题
- 1. 不支持Internet Explorer jquery
- 2. PongWebSocketFrame不受Internet Explorer支持
- 3. Internet Explorer(IE)支持
- 4. .includes()在Internet Explorer中不工作
- 5. 对Internet Explorer的Mediaelement.js支持
- 6. Internet Explorer网站支持
- 7. JSON支持在Internet Explorer 9
- 8. Internet Explorer是否支持arguments.callee.name?
- 9. Internet Explorer 11支持converse.js吗?
- 10. window.postMessage Internet Explorer 11支持
- 11. Internet Explorer 9不支持css3风格
- 12. Internet Explorer 8不支持我的设计
- 13. JavaScript:方法forEach不支持从Internet Explorer
- 14. 为什么Internet Explorer 11对象不支持属性或方法'findIndex'
- 15. 为什么Internet Explorer不显示foreignObject?
- 16. Internet Explorer和Firefox支持@media页面吗?
- 17. pcm在Internet Explorer中的数据支持
- 18. webcomponentsjs库是否支持Internet Explorer 9?
- 19. Firebreath 1.6支持Internet Explorer 10吗?
- 20. Google Plus按钮API支持Internet Explorer 8
- 21. 门槛停止支持Internet Explorer的
- 22. Internet Explorer支持的内容类型
- 23. 支持Internet Explorer 6的HTML5视频>?
- 24. Internet Explorer 8支持哪些CSS3功能?
- 25. Internet Explorer 11是否支持Multi-Touch?
- 26. 为什么Internet Explorer Cache xhr请求?
- 27. 为什么在Internet Explorer 8中泄漏?
- 28. 原型扩展jQuery不工作在Internet Explorer中 - “不支持”
- 29. 为第n个孩子选择Internet Explorer的支持
- 30. Windows 7上的Internet Explorer 11之后是什么?企业如何支持ES2016?
'Array.prototype.includes'实际上是由ES7引入的。 –