How to avoid warnings for components registered with document.registerElement

匆匆过客 提交于 2019-12-11 13:36:18

问题


I'm looking to use the github time-elements custom web components in a polymer dart application. They work as expected, however I get the warning:

Warning from polymer (Linter) ... custom element with name "relative-time" not found. See http://goo.gl/5HPeuP#polymer_11 for details.

Following that link explains the problem pretty well:

This warning can also be a false alarm. For instance, when an element is defined programatically using document.registerElement. In that case the polymer build will not be able to see the definition and will produce this warning.

Is there a recommended approach to making those warnings go away - e.g. by manually registering the elements with dart/polymer?


回答1:


There are two options

  • disable the widget
transformers:
- polymer:
    inject_build_logs_in_output: false
  • disable the Polymer linter
transformers:
- polymer:
   lint: false

see also http://dartbug.com/21237



来源:https://stackoverflow.com/questions/28600209/how-to-avoid-warnings-for-components-registered-with-document-registerelement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!