我刚刚安装了 Chrome 开发编辑器并尝试使用其中一个示例模板:
- 新项目 >> 项目类型 = JavaScript Chrome 应用程序(使用 Polymer 纸元素) >> 创建
- 右键单击 >> 为 CSP 重构
- 点击运行(黑色箭头)
打开一个窗口,其中似乎是示例 Polymer 应用程序,没有 Polymer 功能(仅 html 标记)。以下是开发人员工具中控制台报告的内容:
extensions::platformApp:31 Uncaught Error: document.write() is not available in packaged apps.
index.html:338 GET chrome-extension://fonts.googleapis.com/css?family=RobotoDraft:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en net::ERR_FAILED
core-resizable.html.0.js:95 Uncaught TypeError: undefined is not a function
polymer.html.0.js:5 Uncaught TypeError: Cannot read property 'parentNode' of undefined
unresolved.js:30 Uncaught ReferenceError: Platform is not defined
queue.js:138 Uncaught ReferenceError: CustomElements is not defined
我发现与 IDE 捆绑的示例应用程序不能开箱即用,这让我感到非常惊讶,所以我想我一定是在某处做错了什么......
我的问题是:有谁知道我应该对示例代码或我的配置进行哪些更改才能使其正常运行?
谢谢
注意:可能有用,我使用的是 Chrome 版本 39.0.2171.71 m