Partilhar via


HTMLDocumentEvents interface

This dispinterface provides a connection point so that an application or control can intercept events fired by a document object.

Members

The HTMLDocumentEvents interface inherits from the IUnknown interface. HTMLDocumentEvents also has these types of members:

  • Events

Events

The HTMLDocumentEvents interface has these events.

Event Description
click

Fires when the user clicks the left mouse button on the object.

Note  Starting with IE11, this event fires a MSPointerEvent object instead of MouseEvent. You can use the MouseEvent.pointerType property to determine the type of contact that the click originated from (touch, mouse, or pen).
 
afterupdate

Fires on a databound object after successfully updating the associated data in the data source object.

beforeactivate

Fires immediately before the object is set as the IHTMLDocument2::activeElement.

beforeeditfocus

Fires before an object contained in an editable element enters a UI Activation state or when an editable container object is control selection.

beforeupdate

Fires on a databound object before updating the associated data in the data source object.

cellchange

Fires when data changes in the data provider.

contextmenu

Fires when the user clicks the right mouse button in the client area, opening the context menu.

Note  Starting with IE11, this event fires a MSPointerEvent object instead of MouseEvent. You can use the MouseEvent.pointerType property to determine the type of contact that the click originated from (touch, mouse, or pen).
 
dataavailable

Fires periodically as data arrives from data source objects that asynchronously transmit their data.

datasetchanged

Fires when the data set exposed by a data source object changes.

dblclick

Fires when the user double-clicks the object.

Note  Starting with IE11, this event fires a MSPointerEvent object instead of a MouseEvent. You can use the MouseEvent.pointerType property to determine the type of contact that the click originated from (touch, mouse, or pen).
 
dragstart

Fires on the source object when the user starts to drag a text selection or selected object.

errorupdate

Fires on a databound object when an error occurs while updating the associated data in the data source object.

focusin

Fires for an element just prior to setting focus on that element.

focusout

Fires for the current element with focus immediately after moving focus to another element.

help

Fires when the user presses the F1 key while the client is the active window.

keydown

Fires when the user presses a key.

keypress

Fires when the user presses an alphanumeric key.

mousedown

Fires when the user clicks the object with either mouse button.

mousemove

Fires when the user moves the mouse over the object.

mouseout

Fires when the user moves the mouse pointer outside the boundaries of the object.

mouseover

Fires when the user moves the mouse pointer into the object.

mouseup

Fires when the user releases a mouse button while the mouse is over the object.

mousewheel

Fires when the wheel button is rotated.

ondatasetcomplete

Fires to indicate that all data is available from the data source object.

onkeyup

Fires when the user releases a key.

propertychange

Fires when a property changes on the object.

Note  The HTMLDocumentEvents::onpropertychange event is only supported in conjunction with the legacy IHTMLElement2::attachEvent IE-only event registration model, which has deprecated since Internet Explorer 9 in favor of the W3C standard "IEventTarget::addEventListener" event model.
 
readystatechange

Fires when the state of the object has changed.

rowenter

Fires to indicate that the current row has changed in the data source and new data values are available on the object.

rowexit

Fires just before the data source control changes the current row in the object.

rowsdelete

Fires when rows are about to be deleted from the recordset.

rowsinserted

Fires just after new rows are inserted in the current recordset.

selectionchange

Fires when the selection state of a document changes.

selectstart

Fires when the object is being selected.

stop

Fires when the user clicks the Stop button or leaves the document.

 

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll