File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,28 @@ export default function undom() {
101101 set : val => { this . setAttribute ( 'style' , val ) ; } ,
102102 get : ( ) => this . getAttribute ( 'style' )
103103 } ) ;
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+ } ) ;
104113 }
105114
106115 get children ( ) {
107116 return this . childNodes . filter ( isElement ) ;
108117 }
109118
119+ insertBefore ( child , ref ) {
120+ super . insertBefore ( child , ref ) ;
121+ if ( this . _innerHTML ) {
122+ this . _innerHTML = '' ;
123+ }
124+ }
125+
110126 setAttribute ( key , value ) {
111127 this . setAttributeNS ( null , key , value ) ;
112128 }
You can’t perform that action at this time.
0 commit comments