This page is Ready to Use

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

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