getRegions

Jump to: navigation, search

getRegions()

W3C Working Draft

Summary

Returns the static sequence of regions into which content flows.

Method of apis/css-regions/NamedFlow

Syntax

var regions = flow.getRegions();


Return Value

Returns an object of type function.

Returns the static sequence of regions into which content flows. The regions are returned in document order.




Compatibility

There is no data available for topic "webapi", feature "getRegions". If you think that there should be data available, consider opening an issue.

Examples

Remove the first empty node from a flow:

JavaScript

var flow = document.getNamedFlows().namedItem('main');
var index = flow.firstEmptyRegionIndex;
if (index !== -1) {
    var emptyRegion = flow.getRegions()[index];
    emptyRegion.parentNode.removeChild(emptyRegion);
}



Related specifications

Specification Status Related Changes
CSS Regions Module Level 1 W3C Working Draft

See also

Related articles

Regions






  • getRegions()


























External resources