【发布时间】:2016-12-12 15:11:20
【问题描述】:
在使用 typescript 编译的项目上使用 Angular 2。
尝试创建 blob 图像时出现此错误:
error TS2339: Property 'webkitURL' does not exist on type 'Window'
ts 代码为:
public url = window.URL || window.webkitURL;
this.photo = this.url.createObjectURL( res );
【问题讨论】:
-
webkitURL已弃用。
标签: javascript google-chrome typescript angular webkit