cssRules / ID selectors
Paul Temple
paul.temple at gmx.net
Thu Feb 10 00:39:38 GMT 2005
In konqueror (and other browsers) you can get access to an CSS
selector text from JS by using
document.styleSheets[i].cssRules[j].selectorText
When using an ID selector that starts with a '#' like this
#helloWorld { ... }
the property "document.styleSheets[i].cssRules[j].selectorText"
returns
*[id"helloWorld"]
However, in an earlier version konqueror returned
/a[id"helloWorld"]
And IE and NS browsers return the plain
#helloWorld
I should note that the following warning message (defined in
css_base.cpp) is displayed for every ID selectors:
WARNING: Unhandled case in CSSStyleRuleImpl::selectorText :
match=1
Now my questions: Why and when did that change and is it likely
to change again in the future? (A web designer wants to rely on
this... as he can with the other browsers)
More information about the kfm-devel
mailing list