We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4d70bf commit f3dab1aCopy full SHA for f3dab1a
1 file changed
src/undom.js
@@ -101,12 +101,28 @@ export default function undom() {
101
set: val => { this.setAttribute('style', val); },
102
get: () => this.getAttribute('style')
103
});
104
+ Object.defineProperty(this, 'innerHTML', {
105
+ set: val => {
106
+ while (this.firstChild) {
107
+ this.removeChild(this.firstChild);
108
+ }
109
+ this._innerHTML = val;
110
+ },
111
+ get: () => { return this._innerHTML; }
112
+ });
113
}
114
115
get children() {
116
return this.childNodes.filter(isElement);
117
118
119
+ insertBefore(child, ref) {
120
+ super.insertBefore(child, ref);
121
+ if (this._innerHTML) {
122
+ this._innerHTML = '';
123
124
125
+
126
setAttribute(key, value) {
127
this.setAttributeNS(null, key, value);
128
0 commit comments