DOM inspector question

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Posts: 77
Joined: December 19th, 2005, 2:53 pm

Post Posted April 12th, 2006, 2:33 pm


I would like to know the difference between
* JavaScript Object->Style->visibility and
* Computed Style->visibility

In some case, I see they have different value,
I see 'JavaScript Object->Style->visibility ' with the value ""
but Computed Style->visibility has the value 'hidden'

Why there is a difference?

Thank you.


Post Posted April 12th, 2006, 2:45 pm

JavaScript Object >Style > shows properties that are present in the style attribute of elements. For example:
Code: Select all
<p style="visibility: hidden">Hidden paragraph</p>

That value would be shown under JavaScript Object whereas this would not:

p {
  visibility: hidden

When you set CSS properties via Javascript, they are added to the style attribute of elements. This most likely explains why only those properties are seen there."hidden";

Return to Web Development / Standards Evangelism

Who is online

Users browsing this forum: No registered users and 1 guest