- From: Dominic Farolino <notifications@github.com>
- Date: Wed, 03 Apr 2024 20:06:03 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 4 April 2024 03:06:07 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> I think you're right. I've indented the `<old>` and added the end `<p>` after it. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1261#discussion_r1550826618 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1261/review/1978586987@github.com>
Received on Thursday, 4 April 2024 03:06:07 UTC