Re: [css-regions] Possible change to the Region interface

On 9/30/13 3:45 PM, "Simon Pieters" <simonp@opera.com> wrote:

>On Mon, 30 Sep 2013 17:50:26 +0200, Alan Stearns <stearns@adobe.com>
>wrote:
>
>> It seems odd that I can get from an Element to a PseudoElement, but
>> there's no way to get back from the PseudoElement to the Element (or
>>find
>> out which PseudoElement it is). Am I missing something?
>
>It hasn't beed added yet because none of these points from the end of the
> 
>email below have been met yet, AFAIK:
>
>http://lists.w3.org/Archives/Public/www-style/2013Aug/0453.html

I think these steps are a compelling use case, but I admit I'm a bit
biased.

1. Get a PseudoElement from NamedFlow.getRegions()
2. Now I want to modify this PseudoElement's style by adding a new style
rule with the associated element's ID and this pseudo-element's string.

If we change Region to be a standalone interface as I've suggested, then
this information is already available to use. If Region is a supplemental
interface on PseudoElement, more PseudoElement attributes would be
required.

>
>
>> In any case, it's easy enough to say in a spec:
>>
>> Element implements Region
>> PseudoElement implements Region
>>
>> But the question then is what happens with the NamedFlow.getRegions()
>> call, which is intended to return a sequence of Regions. If those
>>Regions
>> can be either an Element or a PseudoElement, what then?
>
>You can make the return value sequence<(Region or Element or
>PseudoElement)>

I'd hope that if Region is a supplemental interface I could spec
sequence<Region> without needing to know which future interfaces decided
to implement Region. If the above would be required I think that's another
argument for a standalone interface.

Thanks,

Alan

Received on Wednesday, 2 October 2013 21:28:09 UTC