Via step 6.2. of https://dom.spec.whatwg.org/#concept-create-element to step 13.2. of https://heycam.github.io/webidl/#construct-a-callback-function to step 3 of https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script we should be executing microtasks immediately after constructing a custom element. This bug was caught by a test case in LayoutTests/imported/w3c/web-platform-tests/custom-elements/microtasks-and-constructors.html
Pull request: https://github.com/WebKit/WebKit/pull/2132
Committed 252190@main (e7be2359033b): <https://commits.webkit.org/252190@main> Reviewed commits have been landed. Closing PR #2132 and removing active labels.
<rdar://problem/96550519>