Mutation Events and Null values

In the documentation for initMutationEvent, the descriptions of
prevValueArg,
newValueArg and attrNameArg specify their values may be NULL. The spec
is
not clear as to whether this means the value is optional, or only that
it may be
NULL if it is not used for specific MutationEvent types, such as
prevValueArg is
not used for a DOMSubtreeModified MutationEvent.

In order to be DOM-compliant, are prevValueArg, newValueArg and
attrNameArg
required to be non-null for those MutationEvent types for which they
apply?

It seems like supporting this requirement for prevValue could degrade
overall UA performance since it could significantly increase the memory
requirements and event traffic associated with document modification.
In many cases, I could see the event being useful without the previous
value.
The impact of newValue isn't as significant since it should also be the
node's current value, but it does seem redundant for the same reason.

Brad Pettit
Microsoft Corp.

Received on Tuesday, 14 May 2002 13:36:15 UTC