Element object

Represents an element in an HTML or XML document.

Internet Explorer 8

DOM Information

Inheritance Hierarchy

 Node
   Element

Members

The Element object has these types of members:

Events

The Element object has these events.

EventDescription
gotpointercapture

Dispatched prior to the dispatch of the first event after pointer capture is set for a pointer.

lostpointercapture

Dispatched after pointer capture is released for a pointer.

MSPointerHover

Event that is triggered when a contact (normally a pen) moves over an element without touching the surface.

pointercancel

Dispatched when either (1) the system has determined that a pointer is unlikely to continue to produce events (for example, due to a hardware event), or (2) after having fired the pointerdown event, the pointer is subsequently used to manipulate the page viewport (for example, panning or zooming).

pointerdown

Dispatched when a pointer enters the state of having a non-zero value for the buttons property.

pointerenter

Dispatched when a pointing device is moved into the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover.

pointerleave

Dispatched when a pointing device is moved outside of the hit test boundaries of an element or one of its descendants, including as a result of a pointerdown event from a device that does not support hover.

pointermove

Dispatched when a pointer changes coordinates, button state, pressure, tilt, or contact geometry (for example, width and height).

pointerout

Dispatched when any of the following occurs:

  • A pointing device is moved out of the hit test boundaries of an element
  • After firing the pointerup event for a device that does not support hover
  • After firing the pointercancel event
pointerover

Dispatched when a pointing device is moved into the hit test boundaries of an element. Also dispatched prior to a pointerdown event for devices that do not support hover.

pointerup

Dispatched when a pointer leaves the state of having a non-zero value for the buttons property.

 

Methods

The Element object has these methods.

MethodDescription
msGetRegionContent

Returns an array of Range instances corresponding to the content from the region flow that is positioned in the region.

msRequestFullscreen

Request that the browser display an element in full-screen mode.

msZoomTo

Scrolls and/or zooms an element to its specified coordinate with animation.

releasePointerCapture

Releases a pointer captured by an element (using the setPointerCapture method).

setPointerCapture

Assigns a specified pointer to an element. This method is used to ensure that an element continues to receive pointer events even if the contact moves off the element.

 

Properties

The Element object has these properties.

PropertyAccess typeDescription

msContentZoomFactor

Read/write

Specifies the content zoom factor.

msRegionOverflow

Read-only

Determines if content fully fits into the region or not.

x-ms-acceleratorKey

Provides a way to declare that an accelerator key has been assigned to an element.

 

Remarks

The Element interface represents an element in an HTML or XML document. Elements may have attributes associated with them; since the Element interface inherits from Node, the generic Node interface attribute attributes may be used to retrieve the set of all attributes for an element. There are methods on the Element interface to retrieve either an attribute object by name or an attribute value by name. In XML, where an attribute value may contain entity references, an attribute object should be retrieved to examine the possibly fairly complex sub-tree representing the attribute value. On the other hand, in HTML, where all attributes have simple string values, methods to directly access an attribute value can safely be used as a convenience.

 

 

Show:
© 2014 Microsoft. All rights reserved.