Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | no | no | 4.0+ | no | no |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
Creates a new instance of a Layer object. | no | no | 4.0+ | no | no |
Properties
| Property | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
Layer object directly above the current layer in the z-index order. | no | no | 4.0+ | no | no |
Image displayed in the background of the layer. | no | no | 4.0+ | no | no |
Layer object directly below the current layer in the z-index order. | no | no | 4.0+ | no | no |
Background color of the layer. | no | no | 4.0+ | no | no |
Bottom edge of the clipping area of the layer, relative to layer.top. | no | no | 4.0+ | no | no |
Height of the clipping area of the layer. | no | no | 4.0+ | no | no |
Left edge of the clipping area of the layer, relative to layer.left. | no | no | 4.0+ | no | no |
Right edge of the clipping area of the layer, relative to layer.right. | no | no | 4.0+ | no | no |
Top edge of the clipping area of the layer, relative to layer.top. | no | no | 4.0+ | no | no |
Width of the clipping area of the layer. | no | no | 4.0+ | no | no |
Document associated with the layer. | no | no | 4.0+ | no | no |
Specifies whether a layer is hidden (true) or visible (false). | no | no | 4.0+ | no | no |
Array of child layers of the current layer. | no | no | 4.0+ | no | no |
Horizontal position (in pixels) of the left edge of the layer. | no | no | 4.0+ | no | no |
Name of the layer. | no | no | 4.0+ | no | no |
Horizontal position (in pixels) of the layer relative to the page. | no | no | 4.0+ | no | no |
Vertical position (in pixels) of the layer relative to the page. | no | no | 4.0+ | no | no |
Parent layer of the current layer. | no | no | 4.0+ | no | no |
Layer object directly above the current layer in the z-index order that shares the same parent as the current layer. | no | no | 4.0+ | no | no |
Layer object directly below the current layer in the z-index order that shares the same parent as the current layer. | no | no | 4.0+ | no | no |
URL for the contents of the layer. | 4.0+ | no | no | no | no |
Vertical position (in pixels) of the top edge of the layer. | no | no | 4.0+ | no | no |
Specifies whether the layer should be visible ("show"), hidden ("hide"), or inherit the visibility of the parent layer ("inherit"). | |||||
Window or frame object that contains the layer. | no | no | 4.0+ | no | no |
Horizontal position (in pixels) of the left edge of the layer. | no | no | 4.0+ | no | no |
Vertical position (in pixels) of the top edge of the layer. | no | no | 4.0+ | no | no |
Position of the layer in the z-order, relative to its sibling layers. | no | no | 4.0+ | no | no |
Methods
| Method | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
Sets the layer to capture all events of a specified type. | no | no | 4.0+ | no | no |
Calls the event handler for the specified event. | no | no | 4.0+ | no | no |
Loads contents into the layer and updates the width of the layer. | no | no | 4.0+ | no | no |
Moves the current layer above another layer. | no | no | 4.0+ | no | no |
Moves the current layer below another layer. | no | no | 4.0+ | no | no |
Moves the layer the specified amount down and to the right. | no | no | 4.0+ | no | no |
Moves the layer to a specified position relative to the document or parent layer. | no | no | 4.0+ | no | no |
Moves the layer to a specified position on the page. | no | no | 4.0+ | no | no |
Moves a layer down and to the right by a specified amount. Deprecated by moveBy(). | no | no | 4.0+ | no | no |
Sets the layer to release all captured events of a specified type. | no | no | 4.0+ | no | no |
Resize the layer by the specified amount. | no | no | 4.0+ | no | no |
Resize the layer to a specified size. | no | no | 4.0+ | no | no |
Routes a captured event through the event hierarchy. | no | no | 4.0+ | no | no |
References
Availability
Netscape 4 only | discontinued in Netscape 6
Constructor Detail
Property Detail
Object above
Layer object directly above the current layer in the z-index order.
Object background
Image displayed in the background of the layer.
Object below
Layer object directly below the current layer in the z-index order.
String bgColor
Background color of the layer.
Object clip.bottom
Bottom edge of the clipping area of the layer, relative to layer.top.
- See Also
Object clip.height
Height of the clipping area of the layer.
- See Also
Object clip.left
Left edge of the clipping area of the layer, relative to layer.left.
- See Also
Object clip.right
Right edge of the clipping area of the layer, relative to layer.right.
Object clip.top
Top edge of the clipping area of the layer, relative to layer.top.
- See Also
Object clip.width
Width of the clipping area of the layer.
Object document
Document associated with the layer.
Boolean hidden
Specifies whether a layer is hidden (true) or visible (false).
Array layers
Array of child layers of the current layer.
Number left
Horizontal position (in pixels) of the left edge of the layer.
String name
Name of the layer.
Number pageX
Horizontal position (in pixels) of the layer relative to the page.
Number pageY
Vertical position (in pixels) of the layer relative to the page.
Object parentLayer
Parent layer of the current layer.
Object siblingAbove
Layer object directly above the current layer in the z-index order that shares the same parent as the current layer.
Object siblingBelow
Layer object directly below the current layer in the z-index order that shares the same parent as the current layer.
String src
URL for the contents of the layer.
Number top
Vertical position (in pixels) of the top edge of the layer.
String visibility
Specifies whether the layer should be visible ("show"), hidden ("hide"), or inherit the visibility of the parent layer ("inherit").
Object window
Window or frame object that contains the layer.
Object x
Horizontal position (in pixels) of the left edge of the layer.
Object y
Vertical position (in pixels) of the top edge of the layer.
Object zIndex
Position of the layer in the z-order, relative to its sibling layers.
Method Detail
captureEvents() : Object
Sets the layer to capture all events of a specified type.
handleEvent() : Object
Calls the event handler for the specified event.
load(String src, Number width) : Object
Loads contents into the layer and updates the width of the layer.
| String | src | URL for the contents of the layer. |
| Number | width | New width of the layer. |
- See Also
- Availability
Netscape 4 only
moveAbove(Object target) : Object
Moves the current layer above another layer.
| Object | target | Layer to move the current layer above. |
moveBelow(Object target) : Object
Moves the current layer below another layer.
| Object | target | Layer to move the current layer below. |
moveBy(Number dx, Number dy) : Object
Moves the layer the specified amount down and to the right.
| Number | dx | Amount to move the layer to the right. Specify a negative value to move the layer to the left. |
| Number | dy | Amount to move the layer down. Specify a negative value to move the layer up. |
moveTo(Object x, Object y) : Object
Moves the layer to a specified position relative to the document or parent layer.
| Object | x | Horizontal position (in pixels) of the left edge of the layer. |
| Object | y | Vertical position (in pixels) of the top edge of the layer. |
moveToAbsolute(Object x, Object y) : Object
Moves the layer to a specified position on the page.
| Object | x | Horizontal position (in pixels) of the left edge of the layer. |
| Object | y | Vertical position (in pixels) of the top edge of the layer. |
- Availability
Netscape 4 only
offset(Number dx, Number dy) : Object
Moves a layer down and to the right by a specified amount. Deprecated by moveBy().
| Number | dx | Amount to move the layer to the right. Specify a negative value to move the layer to the left. |
| Number | dy | Amount to move the layer down. Specify a negative value to move the layer up. |
- See Also
- Availability
Netscape 4 only | deprecated
releaseEvents() : Object
Sets the layer to release all captured events of a specified type.
resizeBy(Number dw, Number dh) : Object
Resize the layer by the specified amount.
| Number | dw | Number of pixels to resize the layer by horizontally. |
| Number | dh | Number of pixels to resize the layer by vertically. |
- Availability
Netscape 4 only
resizeTo(Object width, Object height) : Object
Resize the layer to a specified size.
| Object | width | Number of pixels wide the layer should be. |
| Object | height | Number of pixels tall the layer should be. |
routeEvent() : Object
Routes a captured event through the event hierarchy.
