Export (0) Print
Expand All

initMutationEvent method

Initializes a new Document Object Model (DOM) mutation (modification) event that the createEvent method created.

Document Object Model (DOM) Level 3 Events Specification, Section 5.2.8Internet Explorer 9

 

Syntax

var retval = MutationEvent.initMutationEvent(eventType, canBubble, cancelable, relatedNodeArg, prevValueArg, newValueArg, attrNameArg, attrChangeArg);

Parameters

eventType [in]

Type: String

One of the following values, or a user-defined custom event type.

DOMSubtreeModified

A general modification event. This event occurs for all changes to the document.

DOMNodeInserted

A node was inserted as a child of another node.

DOMNodeRemoved

A node was removed from its parent node.

DOMAttrModified

An attribute node has been changed. The value of the attrChange property indicates whether the node was added, modified, or removed.

DOMCharacterDataModified

Character data within the node was modified. The target of the event is the text node.

canBubble [in]

Type: Boolean

true (true)

The event should propagate upward.

false (false)

The event does not propagate upward.

cancelable [in]

Type: Boolean

true (true)

The default action can be canceled.

false (false)

The default action cannot be canceled.

relatedNodeArg [in]

Type: Object

A secondary node that is related to the event. This value is returned as the relatedNode property of the event.

prevValueArg [in]

Type: String

The previous value of the attribute or text node. This value is returned as the prevValue property of the event.

newValueArg [in]

Type: String

The new value of the attribute or text node. This value is returned as the newValue property of the event.

attrNameArg [in]

Type: String

The name of the changed attribute in a DOMAttrModified event. This value is returned as the attrName property of the event.

attrChangeArg [in]

Type: Number

The type of modification in a DOMAttrModified event. This value is returned as the attrChange property of the event.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Standards information

Remarks

The DOMNodeInsertedIntoDocument and DOMNodeRemovedFromDocument event type values are not supported.

See also

MutationEvent

 

 

Show:
© 2014 Microsoft