New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0-preview throw an error Uncaught DOMException: Failed to construct 'CustomElement': The result must not have attributes #90

Closed
KitaitiMakoto opened this Issue Dec 10, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@KitaitiMakoto
Copy link

KitaitiMakoto commented Dec 10, 2016

Description

As using 2.0-preview branch, paper-card doesn't work on Chrome. It seems to due to adding class paper-material in created callback. If we do so in ready callback, any error is not thrown.

For paper-button, the same error appears.

Expected outcome

It should not throw any error.

Actual outcome

It outputs error message

Uncaught DOMException: Failed to construct 'CustomElement': The result must not have attributes

in console.

Steps to reproduce

  1. Use paper-card in any document.

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@notwaldorf

This comment has been minimized.

Copy link
Member

notwaldorf commented Dec 12, 2016

I just tested with the latest version of polymer#2.0-preview, and it looks fine. Can you run bower cache clean && bower install and try again?

@KitaitiMakoto

This comment has been minimized.

Copy link

KitaitiMakoto commented Dec 13, 2016

Thank you for the reply.
I cleaned cache but the issue is still remaining.

I found this tiny HTML works fine in Chrome:

$ bower install 'PaperElements/paper-card#2.0-preview'
<!doctype html>
<title>Paper Card</title>
<script src=bower_components/webcomponentsjs/webcomponents-lite.js></script>
<link href=bower_components/paper-card/paper-card.html rel=import></script>

<paper-card heading="Card Title">
  <div class="card-content">Some content</div>
  <div class="card-actions">
    <paper-button>Some action</paper-button>
  </div>
</paper-card>

But, after I vulcanized, it doesn't work and error messages as I reported are output.

$ vulcanize index.html > index.vulcanized.html
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined
Ignoring duplicate element definition: undefined

This seems an issue related to vulcanize rather than paper-card. So, I close this issue and will research vulcanize more.

Thank you.

@KitaitiMakoto

This comment has been minimized.

Copy link

KitaitiMakoto commented Dec 13, 2016

FYI, I found a related issue: https://github.com/Polymer/vulcanize/issues/263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment