Web server version - M MutationEvent.initMutationEvent() (Method) MutationEvent.initMutationEvent() (Method) After creating
M MutationEvent.initMutationEvent() (Method) MutationEvent.initMutationEvent() (Method) After creating a MutationEventobject, it must be initialized with this method call. DOM level 2 JavaScript 1.5 Netscape 6.0 Availability: JavaScript syntax: N myMutationEvent.initMutationEvent(aType, aBubble, aCancel, aNode, aPrev, aNew, aName) aType A string containing the event type aBubble A boolean value indicating whether the event can bubble aCancel A boolean value indicating whether the event can be cancelled aNode A reference to a related Node object aPrev A string containing the previous value aNew A string containing the new value Argument list: aName A string containing the name of an attribute A new event object is manufactured by calling the DocumentEvent.createEvent() method. That event should have been defined with a type specified as “MutationEvent”. If it was, then it will support an initMutationEvent()method. This must be called before the event is dispatched otherwise the event object will not contain enough information for the event dispatcher/handler to make sense of it and route it to the correct target objects. Two boolean argument values define whether the event will be allowed to be cancelled and what type of propagation to use (bubbleor capture). You can add a reference to a related node and can also define previous and new values if you are simulating an attribute change. Finally for an attribute change, the attribute name can be specified. See also: Event.target, EventTarget object, Node object MutationEvent.newValue (Property) When an attribute changes, the new attribute value is available here. DOM level 2 JavaScript 1.5 Netscape 6.0 Availability: Property/method value type: JavaScript syntax: String primitive myMutationEvent.newValue N You can use this value to check that the new attribute value is appropriate and if necessary modify it to ensure it falls within your require range. You can compare it with the previous value if need be. 1475