- Issue created by @roderik
Two things:
$ce = CustomElement::create('MYTAG')
->setSlot('content', 'FIRST')
->addSlot('content', 'SECOND');
sets slotNormalizationStyle NORMALIZE_AS_SINGLE_VALUE. (Specifically: a setSlot() call without $index parameter does this.)
<mytag><div slot="content">FIRST</div><div slot="content">SECOND</div></mytag>
But normalizing JSON produces
[ 'element' => 'mytag', 'content' => 'FIRST']
In other words, the CustomElement::$slotNormalizationStyles
property is only used for JSON output, not HTML.
Work out what we want to do with this.
(CustomElement and set/addSlot() calls' documentation could use an overhaul/extension, apart from this. I'll later decide whether to do this in this same issue, or maybe file a followup, or maybe I will have already done that before this issue is addressed...)
Active
3.0
Code