LayoutWorkletGlobalScope Class
The global object of a layout worklet (https://drafts.css-houdini.org/css-layout-api-1/#layoutworkletglobalscope): the scripts added to CSS.layoutWorklet register the classes that lay out the display: layout() boxes.
public sealed class LayoutWorkletGlobalScope : WorkletGlobalScope- Inheritance
WorkletGlobalScopeLayoutWorkletGlobalScope
Methods
| Name | Description |
|---|---|
| RegisterLayout(string, WorkletClassConstructor) | Registers a class that lays out the display: layout() boxes (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutworkletglobalscope-registerlayout). |
RegisterLayout(string, WorkletClassConstructor)
LayoutWorklet.csRegisters a class that lays out the display: layout() boxes (https://drafts.css-houdini.org/css-layout-api-1/#dom-layoutworkletglobalscope-registerlayout).
public void RegisterLayout(string name, WorkletClassConstructor layoutCtor)Parameters
namestring- The name of the layout.
layoutCtorWorkletClassConstructor- The class: its static
inputProperties,childInputPropertiesandlayoutOptionsproperties are read once, and its prototype has theintrinsicSizesandlayoutcallbacks.
Exceptions
TypeErrorException- The name is empty, the options are invalid, the prototype of the class is not an object, or it has no
intrinsicSizesorlayoutfunction. DomException- An
InvalidModificationErrorwhen the name is already registered in the global scope.