This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

getRegions()

Summary

Returns the static sequence of regions into which content flows.

Method of apis/css-regions/NamedFlowapis/css-regions/NamedFlow

Syntax

var regions = flow.getRegions();

Return Value

Returns an object of type functionfunction

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

Examples

Remove the first empty node from a flow:

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

Related specifications

CSS Regions Module Level 1
W3C Working Draft

See also

Related articles

Regions

External resources