Skip to content
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

Illegal Constructor for neon-animations and tooltip #2382

Closed
JableSoHo opened this issue Aug 28, 2015 · 5 comments
Closed

Illegal Constructor for neon-animations and tooltip #2382

JableSoHo opened this issue Aug 28, 2015 · 5 comments
Labels

Comments

@JableSoHo
Copy link

Im using ES6 with polymer and am using the master branch which includes the latest code to support ES6 - #2329. Have been getting this :

error TypeError: Illegal constructor
    at TypeError (native)
    at paper-tooltip.Polymer.NeonAnimationRunnerBehaviorImpl._configureAnimationEffects (http://polygit.org/polymer+:master/components/neon-animation/neon-animation-runner-behavior.html:44:53)
    at paper-tooltip.Polymer.NeonAnimationRunnerBehaviorImpl.playAnimation (http://polygit.org/polymer+:master/components/neon-animation/neon-animation-runner-behavior.html:81:32)
    at paper-tooltip.Polymer.hide (http://polygit.org/polymer+:master/components/paper-tooltip/paper-tooltip.html:201:14)
    at iron-input.handler (http://polygit.org/polymer+:master/components/polymer/src/standard/events.html:122:27)

Here is a jsbin illustrating the problem:

http://jsbin.com/hidowozipu/1/edit?html,js,output

@lacolaco
Copy link

I saw your jsbin, but there are not any error. so where do you use paper-tooltip in?

@addyosmani
Copy link
Member

cc @sjmiles @ebidel

@ebidel ebidel added the es6 label Aug 28, 2015
@JableSoHo
Copy link
Author

@laco0416 Sorry, I have added the tooltip

@sorvell
Copy link
Contributor

sorvell commented Aug 28, 2015

I believe this is due to the fact that we are now calling registered before Polymer performs registration tasks. It's not specific to using ES6 per se, but rather neon-animation-behavior and therefore paper-tooltip are not functioning correctly. The issue is at https://github.com/PolymerElements/neon-animation/blob/master/neon-animation-behavior.html#L41.

These changes were not intended to be breaking, but we also anticipate registered to be fairly rarely used at the moment so we'll need to consider if Polymer or neon-animation should be changed.

@sorvell
Copy link
Contributor

sorvell commented Aug 28, 2015

sorvell pushed a commit that referenced this issue Aug 28, 2015
Add beforeRegister; ES6 class must set proto metadata here. Fixes #2382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants