This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

initMutationEvent

Summary

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

Method of dom/MutationEventdom/MutationEvent

Syntax

 event.initMutationEvent(/* see parameter list */);

Parameters

eventType

Data-type
String

The name of the event. Sets the value for the type property.

canBubble

Data-type
Boolean

Whether the event propagates upward. Sets the value for the bubbles property.

cancelable

Data-type
Boolean

Whether the event is cancelable and so preventDefault can be called. Sets the value for the cancelable property.

relatedNode

Data-type
DOM Node

A secondary node that is related to the event. Sets the value for the relatedNode property.

prevValue

Data-type
String

The previous value of the attribute or text node. Sets the value for the prevValue property.

newValue

Data-type
String

The new value of the attribute or text node. Sets the value for the newValue property.

attrName

Data-type
String

The name of the changed attribute in a DOMAttrModified event. Sets the value for the attrName property.

attrChange

Data-type
String

The type of modification in a DOMAttrModified event. Sets the value for the attrChange property.

Return Value

No return value

Related specifications

DOM Level 2 Events
Recommendation

See also

Related articles

Deprecated

Attributions