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
getRegions()
External resources
- W3C editor’s draft: CSS Regions Module Level 3
- Adobe Web Standards: CSS Regions
- Adobe Developer’s Network: CSS3 Regions: Rich page layout with HTML and CSS3
- Sample pages