Closed Bug 398777 Opened 12 years ago Closed 12 years ago

Clearly document the differences and respective use cases for offsetWidth, clientWidth, and scrollWidth

Categories

(Developer Documentation :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Waldo, Unassigned)

Details

There are three different properties for getting the "width" of a node in a document.  The differences between the three are not clearly described anywhere that I can tell, and if I were trying to decide which to use in a particular situation (bug 199692 comment 53), I really wouldn't know which to use.

I think it would be awesome if we clarified the exact behaviors of each of the three and how their values are affected by different combinations of CSS properties and ancestor element styles within each property's article.  I also think it would be awesome if we had an article specifically devoted to getting the width of a node which described when you'd want to use each of the different properties and why you wouldn't want to use the others.
Whee!

Add some links to this on the pages documenting the various properties being discussed, and perhaps mention it more prominently in the DOM section of MDC, and I think you're golden.
Done.  Should have already done that but I just plain forgot; thanks for the reminder.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Documentation Requests → Documentation
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
You need to log in before you can comment on or make changes to this bug.