Property Selector

Standard attribute selectors are more flexible than property
selectors. They also fail silently if the attribute is missing.

document.querySelectorAll("[noexist=blah]"); // 0
document.querySelectorAll(":noexist"); // Error.

Why no generic property selector?

:property(name);
:property(name=value)

- where `value` is required to be an identifier or string [CSS2].
Anyway, I thought it would be useful for the selectors API.

Just wondering if this has occurred to anyone else.

Garrett

Received on Monday, 19 July 2010 07:24:53 UTC