Apparently, I unintentionally disabled foster parenting for synchronously defined custom elements. On one hand, this doesn't match the spec. On the other hand, being able to define custom elements anywhere seems useful especially given there doesn't seem to be any compact issues (given WebKit has been shipping this behavior for two years).
rniwa@webkit.org - Safari is passing foster parenting test on WPT: https://wpt.fyi/results/html/syntax/parsing/template/additions-to-foster-parenting?label=master&label=experimental&aligned&view=subtest&q=foster%20parent Is this required or it is different issue and WPT does not have coverage for this?
This is still broken with respect to custom elements.
<rdar://problem/98460010>