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

Use the John Resig inheritance to define the component prototype #647

Closed
jssuzanne opened this issue Jul 18, 2014 · 3 comments
Closed

Use the John Resig inheritance to define the component prototype #647

jssuzanne opened this issue Jul 18, 2014 · 3 comments
Assignees

Comments

@jssuzanne
Copy link

Hi guys.

My request is simple. For my project All component created have the same prototype base and I use the inheritance model of John Resig (http://ejohn.org/blog/simple-javascript-inheritance/) to define the prototype.

var Base = Class.extend({
base: false, //
ready: function () {
this.base: true;
},
})

Component = Base.extend({
ready: function() {
this.base; // undefined
this._super(); // work
this.base; // true
}
})

Polymer('my-component', Component.prototype)

All the properties and functions declared in the Component exist, the _super method work too, but the functions and properties from Base which aren't overload doesn't work.

Have you an idea for my problème ?

@sjmiles
Copy link
Contributor

sjmiles commented Jul 18, 2014

Currently, we don't support prototype chains as the second argument to Polymer.

We are looking into adding this feature.

@jssuzanne
Copy link
Author

Think for your quick answer.

@sjmiles
Copy link
Contributor

sjmiles commented Aug 18, 2014

Dupe of #211.

@sjmiles sjmiles closed this as completed Aug 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants