nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)See Working with content views for details on how to use this API.
<frame>
and <iframe>
elements are handled as content views. Support for using this API for all scrollable elements is coming; see bug 618975 for details.void scrollBy(in float dxPx, in float dyPx); |
void scrollTo(in float xPx, in float yPx); |
void setScale(in float xScale, in float yScale); |
Attribute | Type | Description |
contentHeight |
float |
Read only. |
contentWidth |
float |
Dimensions of scrolled content in chrome-document CSS pixels. Read only. |
id |
nsContentViewId |
ID that can be used in conjunction with nsIDOMWindowUtils to change the actual document, instead of just how it is transformed; this is a 64-bit unsigned integer. Read only. |
scrollX |
float |
Horizontal scroll offset in chrome-document CSS pixels. When this view is active (that is it is being painted because it's in the visible region of the screen), this value is at first lined up with the content's scroll offset. Note: When this view becomes inactive, the new content view will have scroll values that are reset to the default. Read only. |
scrollY |
float |
Horizontal scroll offset in chrome-document CSS pixels. Read only. |
viewportHeight |
float |
Height of the viewport in chrome-document CSS pixels. Read only. |
viewportWidth |
float |
Width of the viewport in chrome-document CSS pixels. Read only. |
Scrolls the content view by the specified number of chrome-document CSS pixels along each axis. Fails if the view isn't valid.
void scrollBy( in float dxPx, in float dyPx );
dxPx
dyPx
Scrolls the content view to the specified position, in chrome-document CSS pixels. Fails if the view isn't valid.
void scrollTo( in float xPx, in float yPx );
xPx
yPx
Sets the content view's scale for each axis.
void setScale( in float xScale, in float yScale );
xScale
yScale