mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
allow defaulting property values by having property getter default to value stored on prototype (if there is no matching attribute)
This commit is contained in:
@@ -38,7 +38,8 @@ license that can be found in the LICENSE file.
|
||||
a = a.trim();
|
||||
Object.defineProperty(this, a, {
|
||||
get: function() {
|
||||
return this.getAttribute(a);
|
||||
return this.hasAttribute(a) ? this.getAttribute(a) :
|
||||
this.__proto__[a];
|
||||
},
|
||||
set: function(v) {
|
||||
return this.setAttribute(a, v);
|
||||
|
||||
Reference in New Issue
Block a user