@@ -263,6 +263,32 @@ describe('DOMPropertyOperations', () => {
263263 . dispatchEvent ( new Event ( 'customevent' , { bubbles : false } ) ) ;
264264 expect ( oncustomevent ) . toHaveBeenCalledTimes ( 1 ) ;
265265 } ) ;
266+
267+ it ( 'innerHTML should not work on custom elements' , ( ) => {
268+ const container = document . createElement ( 'div' ) ;
269+ ReactDOM . render ( < my-custom-element innerHTML = "foo" /> , container ) ;
270+ const customElement = container . querySelector ( 'my-custom-element' ) ;
271+ expect ( customElement . getAttribute ( 'innerHTML' ) ) . toBe ( null ) ;
272+ expect ( customElement . hasChildNodes ( ) ) . toBe ( false ) ;
273+ } ) ;
274+
275+ // @gate enableCustomElementPropertySupport
276+ it ( 'innerText should not work on custom elements' , ( ) => {
277+ const container = document . createElement ( 'div' ) ;
278+ ReactDOM . render ( < my-custom-element innerText = "foo" /> , container ) ;
279+ const customElement = container . querySelector ( 'my-custom-element' ) ;
280+ expect ( customElement . getAttribute ( 'innerText' ) ) . toBe ( null ) ;
281+ expect ( customElement . hasChildNodes ( ) ) . toBe ( false ) ;
282+ } ) ;
283+
284+ // @gate enableCustomElementPropertySupport
285+ it ( 'textContent should not work on custom elements' , ( ) => {
286+ const container = document . createElement ( 'div' ) ;
287+ ReactDOM . render ( < my-custom-element textContent = "foo" /> , container ) ;
288+ const customElement = container . querySelector ( 'my-custom-element' ) ;
289+ expect ( customElement . getAttribute ( 'textContent' ) ) . toBe ( null ) ;
290+ expect ( customElement . hasChildNodes ( ) ) . toBe ( false ) ;
291+ } ) ;
266292 } ) ;
267293
268294 describe ( 'deleteValueForProperty' , ( ) => {
0 commit comments