Skip to content
Advertisement

Is there a way to create an HTMLElement, which will delete itself later?

I have an abstract class “Component”

JavaScript

Other classes extend this class. Is there a way to make render() return a this.container, which later will be deleted from DOM, i.e. after 5 seconds?

Advertisement

Answer

Have you tried using setTimeout?

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement