首页 文章

未捕获的DOMException无法执行'define' Polymer

提问于
浏览
0

未捕获的DOMException:无法在'CustomElementRegistry'上执行'define':“undefined”不是有效的自定义元素名称...

我的自定义元素被命名为resume-app有人在另一篇文章中提到,这可能是它失败的原因,所以我想知道我还能做错什么?

网页正确加载所有元素,只是控制台被这些例外所困扰 .

2 回答

  • 0

    也许您在脚本中没有函数名称:

    <script>
        Polymer({
            is:  'logout-element',
            logout: function() {
                this.$.logoutEndpoint.go();
            },
            logoutResponse: function() {
                this.fire("logout");
            },
            logoutError: function() {
                this.$.errorToast.text="Logout Service Error";
                this.$.errorToast.show();
            }
        });
    </script>
    
  • 0

    重新安装webcomponents包,不支持旧版本 .

相关问题