最新的Canary,Angular/Webcomponents/Polymer/Polyfill坏了



这是我只在Canary v80中看到的错误。我有一个Angular 1.3/Webcomponents 0.7应用程序,其中一些UI元素没有正确呈现。很难追踪应用程序的哪个元素引发了错误。

例如,我有一个包含文本字段、下拉列表和按钮的页面。在开发工具中,我看到一个错误为

exception: TypeError: Cannot read property 'childNodes' of undefined at nodeLinkFn
at compositeLinkFn ..at compositeLinkFn.. at nodeLinkFn.. at compositeLinkFn ...

在另一页中,我有

el.getPropertyInfo is not a function 
{exception: TypeError: el.getPropertyInfo is not a function..
cause: "<paper-menu class="dropdown-content ng-pristine ng-untouched ng-valid ng-isolate-scope" selected="{{xxx.yyy}}" data-ng-model="xxx" attr-for-selected="name" gi-polymer-event-bind="iron-select:aaa(xxx)" role="menu" tabindex="0">"

所有这些都可以在Chrome中完美运行。

快速解决方法:将原始跟踪标记添加到index.html

请按照以下步骤生成令牌:

您可以通过请求源代码的令牌,选择源代码上的任何页面进行实验功能的试用(https://developers.chrome.com/origintrials/)。注册试用后,我们将为您的原籍生成一个令牌。

有两种方法可以在您的来源中的任何页面上提供此令牌:

  • 在任何页面的首页添加一个origin试用标签。例如,这可能看起来像:

    <meta http-equiv="origin-trial" content="**insert your token as provided in the developer console**">

  • 如果您可以配置服务器,也可以使用Origin Trial HTTP标头在页面上提供令牌。生成的响应标头应该类似于:

    Origin-Trial: **token as provided in the developer console**

注意:您可以为给定页面提供多个令牌。只需要一个有效令牌即可启用试用,任何其他无效令牌或不匹配的令牌都将被忽略。如果同一个页面被提供给不同的来源(例如example.com、example.ca等(,您可能需要提供多个令牌。您可以向页面添加多个标签,包括多个Origin Trial响应标头,或单个Origin Tril响应标头,用逗号分隔的令牌。

参考:https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/developer-guide.md

最新更新