- From: Dominic Farolino <notifications@github.com>
- Date: Thu, 04 Apr 2024 06:32:58 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 4 April 2024 13:33:02 UTC
@domfarolino commented on this pull request. > + const h1 = document.querySelector('h1'); + + const fragment = new DocumentFragment(); + const script = fragment.appendChild(document.createElement('script')); + const style = fragment.appendChild(document.createElement('style')); + + script.innerText= 'console.log(getComputedStyle(h1).color)'; // Prints 'rgb(255, 0, 0)' + style.innerText = 'h1 {color: rgb(255, 0, 0);}'; + + document.body.append(fragment); + </code></pre> + + <p>The script in the above example prints <code class=lang-javascript>'rgb(255, 0, 0)'</code> + because the following happen in order: + + <ol> Oof, I'm sorry! I think I fixed the indenting now. Although I feel like we're back where we were at the first comment here? Not sure. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1261#discussion_r1551697110 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1261/review/1979920815@github.com>
Received on Thursday, 4 April 2024 13:33:02 UTC