On Jun 15, 11:04 pm, Bjoern Hoehrmann <[EMAIL PROTECTED]> wrote: > * Jonathan wrote in mozilla.dev.tech.layout: > > >My question is why CSSStyleDeclaration does not have a function > >hasProperty()? Otherwise, how can i find out if certain css property > >has been specified in the css style declaration? > > You can tell that e.g. from a `null` return value from the getProperty- > CSSValue(...) method, the empty string (since it is not a legal value > for any property) from getPropertyValue(...), and from going through the > .items(0 .. .length) names. You cannot do that with the return value of > getComputedStyle() however, since all properties have a computed value. > -- > Björn Höhrmann · mailto:[EMAIL PROTECTED] ·http://bjoern.hoehrmann.de > Weinh. Str. 22 · Telefon: +49(0)621/4309674 ·http://www.bjoernsworld.de > 68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 ·http://www.websitedev.de/
Bjorn, Thank you. In firebug extension, it has a functionality call 'Inspect'. In which you can click any element in the html document, and it will display the associated / inherited CSS style of that element. I wonder what API firebug is using the achieve that functionality. Thank you. _______________________________________________ dev-tech-layout mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-layout

