W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2011

[whatwg] Allowing custom attributes on <html> or <body> in documents for media resources

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 16 Nov 2011 12:29:04 +1300
Message-ID: <CAOp6jLaoBfqoaNrNcvNCMkDu_mpy3PwGoGBzTRpgWSvi6oB9Kg@mail.gmail.com>
On Wed, Nov 16, 2011 at 12:06 PM, Tab Atkins Jr. <jackalmage at gmail.com>wrote:

> On Tue, Nov 15, 2011 at 2:07 PM, Robert O'Callahan <robert at ocallahan.org>
> wrote:
> > So I propose that a "toplevel" class be set on the root element of a
> media
> > resource document in a toplevel browsing context.
> While I'd normally object that classes are purely an author extension
> point and UAs should stay out, this is a UA-generated page in the
> first place so it's not a big deal.
> I might suggest using a pseudoclass instead, though, as that's the
> normal UA extension point.  Is there any particular reason to prefer a
> class over a pseudoclass?

It's a little bit more code to implement a pseudoclass, at least in Gecko.
(It's literally one line to add a custom class or attribute; the situation
is probably similar in other engines.)

If a custom attribute seems better to you, that's just as easy as a class.

"If we claim to be without sin, we deceive ourselves and the truth is not
in us. If we confess our sins, he is faithful and just and will forgive us
our sins and purify us from all unrighteousness. If we claim we have not
sinned, we make him out to be a liar and his word is not in us." [1 John
Received on Tuesday, 15 November 2011 15:29:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC