Open
Description
In Example 1, section 3.2, the example code of the layout()
function has the line:
const childFragments = yield children.map((child) => {
return child.layoutNextFragment(childConstraints);
});
This is invalid per the spec - it builds up an array of LayoutFragmentRequest objects and yields that, expecting to receive an array of LayoutFragment objects as a result. The spec instead mandates that you have to yield a single LayoutFragmentRequest, and it returns a single LayoutFragment. So this needs to be rewritten as:
const childFragments = [];
for(child of children) {
childFragments.push(yield child.layoutNextFragment(childConstraints));
}