A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/apis/css-regions/Region/getRegionFlowRanges below:

getRegionFlowRanges() · WebPlatform Docs

getRegionFlowRanges() Summary

Returns a series of Range objects that represent the fragments of DOM content that currently flow into the region.

Method of apis/css-regions/Regionapis/css-regions/Region

Syntax
var ranges = region.getRegionFlowRanges();
Return Value

Returns an object of type ArrayArray

Returns a series of Range objects that represent the fragments of DOM content that currently flow into the region.

Examples

Check a region for interruptions in source content:


var flow = document.getNamedFlows().namedItem('main');


var region = flow.getRegions()[1];


var ranges = region.getRegionFlowRanges();


if (ranges.length > 1) {
    adjustlayout(region) 
}
Usage
 By default, calling getRegionFlowRanges() on an overflowing region at the end of a chain (one whose regionOverset is overset) returns fragments representing all remaining content that may overflow out of view.  If the region's region-fragment property is set to break, it returns only those fragments of content that fit neatly within the region.

If the region is too small to display the content, it returns a single collapsed range.

Calling it on an empty region (one whose regionOverset is empty) returns an empty list.

Calling it on an element that is no longer a region (when its flow-from property reverts to none) returns null. The following tests whether the block element currently behaves as a region:

isRegion = (element.getRegionFlowRanges() !== null);
Notes

Regions may display more than one range, because more than one element may specify flow-into to contribute to a flow, and the boundary between those content elements may fall within a region. Also, any content element’s nested elements can be diverted to a different named flow, thus interrupting the original sequence of content. (See flow-into for more details on these scenarios.)

Related specifications
CSS Regions Module Level 1
W3C Working Draft
See also Related articles Regions External resources

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4