- From: David Hyatt <hyatt@apple.com>
- Date: Mon, 17 Oct 2011 11:17:02 -0500
- To: Vincent Hardy <vhardy@adobe.com>
- Cc: Alex Mogilevsky <alexmog@microsoft.com>, www-style list <www-style@w3.org>
- Message-id: <A0CD3314-4562-4068-B0C9-A35F9773030E@apple.com>
I'm not sure where it should go, but don't we also need an API for getting the computed style in a given region?
dave
(hyatt@apple.com)
On Oct 17, 2011, at 6:51 AM, Vincent Hardy wrote:
>
> On Oct 16, 2011, at 11:57 PM, Alex Mogilevsky wrote:
>
>> I have ACTION 350 ( http://www.w3.org/Style/CSS/Tracker/actions/350 ) assigned to me, which is titled “Alexmog to add an api to find out which element is in a named flow”. I actually thought it is about another missing API – to get region from element, but I guess both are needed, so here we go:
>>
>> [Supplemental] interface NamedFlow {
>> NodeList content;
>> NodeList getRegionsByContent(Node node);
>> };
>>
>> ‘content’ property returns an ordered collection of nodes that constitute the named flow. Note that this collection is life (general DOM rules for properties): every time it is queried it must return the same object, and the object is always up to date.
>>
>> getRegionsByContent () gets a collection of regions that contain at least part of the target content. This can be used to navigate by bookmark in paginated view: the method returns regions containing the bookmarked element, which are then passed to pagination UI to show desired region or page.
>>
>> How does this sound? Any better naming ideas?
>
> This sounds good and it is good to have a live list of nodes in the flow.
>
> In terms of naming, I am wondering if 'content' is too generic. May be 'flowNode' would be more specific, even though more verbose:
>
> [Supplemental] interface NamedFlow {
> NodeList flowNodes;
> NodeList getRegionsByFlowNode(Node flowNode);
> }
>
> Cheers,
> Vincent
Received on Monday, 17 October 2011 16:17:42 UTC