Re: [css3-conditional] navigator.supportsCSS rather than window.supportsCSS

On Thu, Aug 16, 2012 at 6:19 PM, Sylvain Galineau
<sylvaing@microsoft.com> wrote:
> [Tab Atkins Jr.]
>> Standards vs quirks doesn't change the recognized properties, does it?
>>  I wasn't aware of that being a quirks-mode difference.
>
> If @supports(display: flexbox) should return true in IE's legacy quirks
> (docmode 5) I'm not sure I understand the point of the feature anymore.
>
> At the least it'd be strange for common feature-detection tools like Modernizr
> to say one thing and CSS to say another.

Heh, IE's modes aren't the same things as "quirks mode" - the latter
is a small set of differences that are roughly standardized (and being
tightened up now).  IE's modes are much more invasive.

However, I'm not sure what the problem is in the first place.  Nested
document have their own "window" object, so they'll have their own
"CSS" object as well.  It can return whatever answer is appropriate
for that document's mode.

(I wish I'd said this immediately in response to Elliott, but a brain
fart made me think that <iframe>s shared the top document's window
object.)

The only remaining wrinkle is that document objects that aren't nested
in a browsing context, like what's returned by XHR.responseXML, won't
have their own window object.  Are these documents coerced to the
parent document's mode?  If so, great.  If not, who cares, you can't
run script inside of them anyway until they're given a browsing
context, so the question of what CSS.supports() would return is moot.

~TJ

Received on Friday, 17 August 2012 17:28:15 UTC