Re: [cssom] CSSRule.parentRule and CSSRule.parentStyleSheet should return a "CSSRule?"

On Sat, Sep 1, 2012 at 5:19 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> In particular, it can return null in various cases; lots of rules don't
> have a parent rule, and in some cases rules are not associated with a
> stylesheet.


Fixed CSSRule.parentRule (I had already done this for
CSSStyleDeclaration.parentRule).

Tentatively made CSSRule.parentStyleSheet return CSSStyleSheet?, but may
need to back it out pending further discussion. In particular, could you
explain what circumstances end up yielding no parent stylesheet? At
present, there are only two ways to create a rule, one is putting it in a
stylesheet to be parsed, the other is using CSSStyleSheet.insertRule. In
both of these cases, there is an associated stylesheet.

Received on Friday, 31 August 2012 23:21:23 UTC