W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2006

[whatwg] getElementsByClassName()

From: Jim Ley <jim.ley@gmail.com>
Date: Sat, 4 Feb 2006 23:53:41 +0000
Message-ID: <851c8d310602041553r1f0954cajaa8b071797c28e78@mail.gmail.com>
On 2/4/06, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:

> One issue with a Selector method though, how do we handle namespace
> prefixes?  Selectors states that the mechanism for declaring a namespace
> prefix is left up to the language implementing Selectors.  If we say the
> script uses the same prefixes declared in the markup using xmlns:foo="",
> then that ties the JS to the document and other documents that use those
> same prefixes.

I think that would be a bad idea, as I think you are, for the same
reason as the QNames in attribute context we've heard so many times
before from me.

>  If we say it uses those declared in CSS with @namespace,
> then that ties the script to the CSS.  Would we need another method
> called addNamespace(namespaceURI, prefix)?

Off the top of my head I would suggest a namespace handler object that
exists on the object, and if the stylesheet language of the document
is css it's pre-filled with the namespace's from css.  This allows us
to have simple use for the CSS case whilst still supporting the
flexibility to add namespaces later.  but that's very much off the top
of my head.

Cheers,

Jim.
Received on Saturday, 4 February 2006 15:53:41 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:26 UTC