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

documentation for attributeChanged is wrong #242

Closed
ojanvafai opened this issue Aug 16, 2013 · 4 comments
Closed

documentation for attributeChanged is wrong #242

ojanvafai opened this issue Aug 16, 2013 · 4 comments
Assignees

Comments

@ojanvafai
Copy link

On http://www.polymer-project.org/polymer.html, it shows

attributeChanged: function(attrName, oldVal, newVal) {
//var newVal = this.getAttribute(attrName);
console.log(attrName, 'old: ' + oldVal, 'new:', newVal);
},

But, the only argument attributeChanged gets is oldVal.

@dannyfritz
Copy link

👍
I confirm that it only passes in the oldValue:
http://jsfiddle.net/dannyfritz/HemmZ/1/

@sjmiles
Copy link
Contributor

sjmiles commented Aug 19, 2013

This needs to be an issue on docs https://github.com/Polymer/docs/issues.

On Mon, Aug 19, 2013 at 11:46 AM, dannyfritz notifications@github.comwrote:

[image: 👍]
I confirm that it only passes in the oldValue:
http://jsfiddle.net/dannyfritz/HemmZ/1/


Reply to this email directly or view it on GitHubhttps://github.com//issues/242#issuecomment-22894886
.

@ebidel
Copy link
Contributor

ebidel commented Aug 20, 2013

In Canary, with native custom elements enabled, newVal is passed to attributeChanged().
In stable, the arg isn't passed.

Try: http://jsbin.com/uxumeq/2/edit

We should update the polyfills accordingly.

@ghost ghost assigned sorvell, ebidel and dfreedm Sep 25, 2013
@dfreedm
Copy link
Member

dfreedm commented Aug 12, 2014

Fixed in googlearchive/CustomElements@8aaf3bc

@dfreedm dfreedm closed this as completed Aug 12, 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

6 participants