Javascript Reference
Categories: TextRange

javascript TextRange boundingHeight, boundingWidth

@March 15, 2008, 1:22 a.m.
boundingHeight, boundingWidthFirefox/Netscape/NN n/a IE 4(Win) Chrome/Safari/DOM n/a  

Read-only  

Return the pixel measure of the imaginary space occupied by the TextRange object. Although you do not see a TextRange object in the document (unless a script selects it), the area of a TextRange object is identical to the area that a selection highlight would occupy. These values cinch up to measure only as wide or tall as the widest and tallest part of the range. You would arrive at these same values by performing arithmetic on values returned from the getBoundingClientRect( ) method.

 
Example
 
var rangeWidth = document.forms[0].myTextArea.createTextRange( ).boundingWidth;
 
Value

Integer.

 
Default

None.


Powered by Linode.