Angular 6 : what is the Reflect API in polyfills. TS?

标签 angular typescript internet-explorer cross-browser polyfills

polyfills.ts 中,其中一行被注释掉的内容如下:

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';

什么是“Reflect API”?它需要哪些 IE 用例?在 IE 中运行 Angular 应用程序时,此导入语句通常很重要吗?令人惊讶的是,Google 和 StackOverflow 并没有为我提供很多/任何结果。

最佳答案

ES6 Reflect API 为您提供了一个 Reflect 对象,让您可以调用方法、构造对象、获取和设置原型(prototype)、操作和扩展属性。 Reflect 是一个内置对象,它为可拦截的 JavaScript 操作提供方法。这些方法与代理处理程序的方法相同。更多详情请查看ReflectES6 Reflect API Tutorial

来自Browser compatibilitySection ,我们可以看到IE不支持Reflect,通过使用Polyfills,它让我们在IE浏览器中使用Reflect。

关于 Angular 6 : what is the Reflect API in polyfills. TS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53091563/

相关文章:

angular - 可以在 HttpInterceptor 中获取上传进度事件,但不能从 HttpClient 调用中获取吗?

javascript - 在没有模板引擎的情况下将express路由到ng2

Angular 2延迟加载导致 View 更改之间的延迟

javascript - IE 11 中不同 'windows' 之间的跨域消息传递

php - Ajax/Internet Explorer 编码问题

javascript - 在 Angular7 中对 typescript 中的字母数字数组进行排序

javascript - 即使在变量初始化之后,原始模型/对象也总是更新

angular - 错误 : "You provided ' undefined' where a stream was expected. 您可以在我的身份验证拦截器中提供 Observable、Promise、Array 或 Iterable。”

angular - 何时在指令 @Inputs 中使用方括号 [ ] 何时不用?

css - IE - 不再可能删除框轮廓?