FragmentResult Class

The result of a layout (https://drafts.css-houdini.org/css-layout-api-1/#fragmentresult): a layout() callback returns a FragmentResultOptions dictionary, or constructs a FragmentResult from it to read the size the fragment will have.

public sealed class FragmentResult

Constructors

NameDescription
FragmentResult(FragmentResultOptions?)Constructs the result of the layout that is running (https://drafts.css-houdini.org/css-layout-api-1/#dom-fragmentresult-fragmentresult, "construct a fragment result").

FragmentResult(FragmentResultOptions?)

LayoutApiObjects.cs

Constructs the result of the layout that is running (https://drafts.css-houdini.org/css-layout-api-1/#dom-fragmentresult-fragmentresult, "construct a fragment result").

public FragmentResult(FragmentResultOptions? options = null)

Parameters

options FragmentResultOptions?
The size of the fragment and the fragments of the children.

Exceptions

TypeErrorException
A child fragment or a break token was not produced by the layout that is running, or a child fragment is listed twice.
DomException
An InvalidStateError when no layout() callback is running; a DataCloneError when the data cannot be cloned.

See also

Properties

NameDescription
BlockSizeGets the border-box block size the fragment will have.
InlineSizeGets the border-box inline size the fragment will have.

Gets the border-box block size the fragment will have.

public double BlockSize { get; }

Gets the border-box inline size the fragment will have.

public double InlineSize { get; }