- From: Danny Engelman <notifications@github.com>
- Date: Wed, 28 Oct 2020 03:17:31 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 28 October 2020 10:17:44 UTC
Can you elaborate on _``setTimeout`` is absolutely the wrong approach_
Doesn't ``setTimeout`` ensure code is run when the Eventloop is done/empty?
If the objective is to access (light)DOM content from the ``connectedCallback``;
**can** ``setTimeout`` code run **too early**?
````
<my-element>Hello </my-element>
...
connectedCallback(){
setTimeout(()=>{
this.innerHTML = this.innerHTML + "World!"
}
}
````
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/903#issuecomment-717835179
Received on Wednesday, 28 October 2020 10:17:44 UTC