Skip to content

Commit da47671

Browse files
committed
adding details to Region interface
1 parent 105bb7b commit da47671

2 files changed

Lines changed: 46 additions & 27 deletions

File tree

css3-regions/Overview.html

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,23 +2100,25 @@ <h3 id=the-region-interface><span class=secno>6.2. </span>The Region
21002100
Region</span>.
21012101

21022102
<div class=note>
2103-
<p>A <a href="#css-region"><code class=idl>Region</code></a> instance may
2104-
represent an object that is no longer a <a href="#css-region">region</a>.
2105-
This may happen, for example if the ‘<a href="#flow-from"><code
2106-
class=property>flow-from</code></a>’ property on the corresponding
2107-
pseudo-element, element or other construct becomes ‘<code
2108-
class=property>none</code>’ but a script is still holding a reference
2109-
to the <a href="#css-region"><code class=idl>Region</code></a> object.</p>
2103+
<p>If the element is not contained in the <span>CSS Region</span> at all,
2104+
the method returns the <a href="#the-at-region-style-rule">region
2105+
styling</a> that would apply to the element if it were contained in the
2106+
CSS Region (following how <a
2107+
href="http://dev.w3.org/csswg/cssom/#dom-window-getcomputedstyle"><code
2108+
class=idl>getComputedStyle</code></a> works with elements not contained
2109+
in the window's document).</p>
21102110
</div>
21112111

2112-
<p>If a <a href="#css-region"><code class=idl>Region</code></a> instance is
2113-
no longer a <a href="#css-region">region</a>, accessing its attributes (<a
2114-
href="#dom-region-regionoverset"><code class=idl>regionOverset</code></a>
2115-
and <a href="#dom-region-flowfrom"><code class=idl>flowFrom</code></a>) or
2116-
invoking its <a href="#dom-region-getregionflowranges"><code
2117-
class=idl><span
2118-
title="#document-element-getregionflowranges">getRegionFlowRanges</span></code></a>
2119-
method throws a <a
2112+
<p>A <a href="#css-region"><code class=idl>Region</code></a> instance may
2113+
represent an object that is no longer a <a href="#css-region">region</a>.
2114+
This may happen for example if the ‘<a href="#flow-from"><code
2115+
class=property>flow-from</code></a>’ property on the corresponding
2116+
pseudo-element, element or other construct becomes ‘<code
2117+
class=property>none</code>’ but a script is still holding a reference to
2118+
the <a href="#css-region"><code class=idl>Region</code></a> object. If a
2119+
<a href="#css-region"><code class=idl>Region</code></a> instance is no
2120+
longer a <a href="#css-region">region</a>, accessing its attributes or
2121+
invoking its methods throws a <a
21202122
href="http://www.w3.org/TR/dom/#exception-domexception"><code
21212123
class=idl>DOMException</code></a> with the <a
21222124
href="http://www.w3.org/TR/dom/#dom-domexception-invalid_access_err"><code

css3-regions/Overview.src.html

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,21 +1884,38 @@ <h3 id="the-region-interface">The Region interface</h3>
18841884
If the element is fragmented across region boundaries,
18851885
the <a href="http://dev.w3.org/csswg/cssom/#cssstyledeclaration">CSSStyleDeclaration</a> returned must apply only
18861886
to the fragment that flows through
1887-
the <span>CSS Region</span>.
1887+
the <span>CSS Region</span>.</p>
18881888

18891889
<div class="note">
1890-
<p>A <code class="idl">Region</code> instance may represent an
1891-
object that is no longer a <span>region</span>. This may happen, for example if the
1892-
'flow-from' property on the corresponding pseudo-element, element or other construct
1893-
becomes 'none' but a script is still holding a reference to the <code class="idl">Region</code> object.</p>
1890+
<p>If the element is not contained
1891+
in the <span>CSS Region</span> at all,
1892+
the method returns
1893+
the <a href="#the-at-region-style-rule">region styling</a>
1894+
that would apply to the element
1895+
if it were contained in the CSS Region
1896+
(following how <a href="http://dev.w3.org/csswg/cssom/#dom-window-getcomputedstyle"><code class="idl">getComputedStyle</code></a> works
1897+
with elements not contained
1898+
in the window's document).</p>
18941899
</div>
1895-
1896-
<p>If a <code class="idl">Region</code> instance is no longer a <span>region</span>,
1897-
accessing its attributes (<code class="idl">regionOverset</code> and <code class="idl">flowFrom</code>) or
1898-
invoking its <code class=
1899-
"idl"><span title="#document-element-getregionflowranges">getRegionFlowRanges</span></code>
1900-
method throws a <a href="http://www.w3.org/TR/dom/#exception-domexception"><code class="idl">DOMException</code></a> with the
1901-
<a href="http://www.w3.org/TR/dom/#dom-domexception-invalid_access_err"><code class="idl">INVALID_ACCESS_ERR</code></a> error code.</p>
1900+
1901+
<p>A <code class="idl">Region</code> instance
1902+
may represent an object
1903+
that is no longer a <span>region</span>.
1904+
This may happen for example
1905+
if the 'flow-from' property
1906+
on the corresponding pseudo-element,
1907+
element or other construct
1908+
becomes 'none'
1909+
but a script is still holding
1910+
a reference to the <code class="idl">Region</code> object.
1911+
If a <code class="idl">Region</code> instance
1912+
is no longer a <span>region</span>,
1913+
accessing its attributes
1914+
or invoking its methods throws a
1915+
<a href="http://www.w3.org/TR/dom/#exception-domexception"><code class="idl">DOMException</code></a>
1916+
with the
1917+
<a href="http://www.w3.org/TR/dom/#dom-domexception-invalid_access_err"><code class="idl">INVALID_ACCESS_ERR</code></a>
1918+
error code.</p>
19021919
</div>
19031920

19041921
<h3 id="region-style-rule-interface">The CSSRegionStyleRule interface</h3>

0 commit comments

Comments
 (0)