JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Window › Dynamic content › Reply To: Dynamic content
Hi Tünde Keller,
Yes, the content of the window element can be changed dynamically via JS in severall ways:
1) innerHTML
– setting innerHTML
directly on the Window instance, for example:
document.querySelector('smart-window').innerHTML = 'new content';
2) appendChild(), removeChild()
methods – using these methods you can append or remove HTML elements to the Window content section, for example:
document.querySelector('smart-window').appendChild(document.createElement('div'));
Furthermore, the content of the Window can be cleared using innerHTML
or the clear()
methods. See the official Window API for additional information.
Best Regards,
Christopher
Smart HTML Elements Team
https://www.htmlelements.com