我们的志愿者还没有将这篇文章翻译为 中文 (简体)。加入我们帮助完成翻译!
nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)Mobile Only in Gecko 2.0
Available only in Firefox Mobile as of Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
To obtain a reference to the view manager for a document, you can QueryInterface()
the nsIFrameLoader
object to nsIContentViewManager
. See Getting access to content views for details. Once you have the view manager, you can call getContentViewsIn()
to get a list of the content views for a given portion of the browser display, then use those nsIContentView
objects to manipulate the content views.
Method overview
void getContentViewsIn(in float aXPx, in float aYPx, in float aTopSize, in float aRightSize, in float aBottomSize, in float aLeftSize, [optional] out unsigned long aLength, [retval, array, size_is(aLength)] out nsIContentView aResult); |
Attributes
Attribute | Type | Description |
rootContentView |
nsIContentView |
The root content view. Read only. |
Methods
getContentViewsIn()
Returns an array of nsIContentView
objects representing all of the content views that intersect with the specified rectangle in the browser
.
Pixels are in chrome device pixels and are relative to the browser element.
void getContentViewsIn(
in float aXPx,
in float aYPx,
in float aTopSize,
in float aRightSize,
in float aBottomSize,
in float aLeftSize,
out unsigned long aLength, Optional
[retval, array, size_is(aLength)] out nsIContentView aResult
);
Parameters
-
aXPx
- The X coordinate of the anchor point of the rectangle, in CSS pixels.
-
aYPx
- The Y coordinate of the anchor point of the rectangle, in CSS pixels.
-
aTopSize
- The distance upward from the Y anchor to expand the rectangle.
-
aRightSize
- The distance to the right from the X anchor to expand the rectangle.
-
aBottomSize
- The distance downward from the Y anchor to expand the rectangle.
-
aLeftSize
- The distance to the left from the X anchor to expand the rectangle.
-
aLength
Optional -
If specified, on return this parameter indicates the number of
nsIContentView
objects returned in theaResult
array. -
aResult
-
On return, an array of
nsIContentView
objects representing the content views in the specified rectangle.