From a68c0b3e38969d3af68693872e4d392c18c77b97 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Thu, 16 Feb 2017 12:20:23 -0800 Subject: [PATCH] Read properties off of proto during configuration. --- src/standard/configure.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/standard/configure.html b/src/standard/configure.html index 97587ebfe0..0f910ebb75 100644 --- a/src/standard/configure.html +++ b/src/standard/configure.html @@ -101,7 +101,12 @@ this._configureProperties(this.behaviors[i].properties, config); } // prototypical behavior - this._configureProperties(this.properties, config); + // Read `properties` off of the prototype, as an concession to non-spec + // compliant browsers where a.) HTMLElement's have a non-spec `properties` + // property, and b.) the `properties` accessor is on instances rather + // than `HTMLElement.prototype`; going under the instance to the prototype + // avoids the problem. + this._configureProperties(this.__proto__.properties, config); // TODO(sorvell): it *may* be faster to loop over _propertyInfo but // there are some test issues. //this._configureProperties(this._propertyInfo, config);