Slot fallback content

Expected: box 1 shows the fallback (no content supplied); box 2 shows the supplied light DOM "REAL CONTENT" and the fallback is discarded.

REAL CONTENT

Whitespace counts as content

Expected: an empty box — the host's only child is a whitespace text node, and whitespace text nodes are still assigned to the default slot, so the fallback is suppressed. This is the classic declarative-shadow-DOM gotcha: formatting the markup changes what renders.

Compare with box 1 above, where the host tag is written with no whitespace at all between it and the template.

Fallback per named slot

Expected: "TITLE GIVEN" for the title (supplied), and the italic default "untitled body" for the body (not supplied).

TITLE GIVEN