Detailed Usage Instructions for Functions in
"clc_mutation.js"
List of Functions
Detailed Usage Instructions
void CLC_InitMutationEventsSystem(DOMObj_targ, optionsArray)
Input parameters:
- DOMObj_targ - The DOM object to watch for mutation events and notifications on.
- optionsArray - Array of integers that specifies options for the mutation events system. optionsArray[0] == if 1, then ignore events that are off; otherwise, capture all events.
Return parameter:
Error messages:
Additional notes:
- This function can be run on the main document ("CLC_Window().document") to watch everything.
- A "DOM Mutation Event" as referred to in this documentation is a DOM event which is an addition, removal, or change of an existing node which is being sent on the "main" WAI-ARIA channel.
- A "DOM Mutation Notification" as referred to in this documentation is a DOM event which is an addition, removal, or change of an existing node which is being sent on the "notify" WAI-ARIA channel.
associativeArray CLC_GetEventCountsAssociativeArray()
Input parameters:
Return parameter:
- associativeArray - An associative array that indicates how many events
of each politeness are in the queue. eventCountsArray["off"],
eventCountsArray["polite"], eventCountsArray["assertive"], and eventCountsArray["rude"].
Error messages:
Additional notes:
DOMMutationEvent CLC_GetMutationEvent()
Input parameters:
Return parameter:
- DOMMutationEvent - The oldest DOM mutation event in the queue. DOM mutation events have the following data members:
- target - The DOM object that is the target of the mutation event.
- parentNode - The DOM object that is the parentNode of the target of the mutation event.
- closestAtomicLiveRegion - The DOM object that is the closest atomic live region to the event; if atomic="false", then the closest atomic live region is the closest element that has at least one of the WAI-ARIA live properties. If no WAI-ARIA live region properties are used, then this will be null.
- type - Text string. "change", "insertion", or "removal"
- preText - Text string. Text content right before the event.
- postText - Text string. Text content right after the event.
- politeness - Text string. "off", "polite", "assertive", or "rude". This can also be "unknown" if there is no WAI-ARIA live= markup used.
- atomic - Boolean. True or false.
- atomicText - Text string. If the event is atomic, then this is the content of the atomic live region that it belongs to; otherwise, this is null.
- relevant - Text string. Any combination of "additions", "removals", and "text".
- interim - Boolean. True or false.
- timestamp - Integer. Time of when the event was added to the DOM mutation events queue.
Error messages:
Additional notes:
- This will remove the oldest DOM mutation event from the queue.
- Returns null if the event queue is empty.
DOMMutationEvent CLC_PeekMutationEvent()
Input parameters:
Return parameter:
- DOMMutationEvent - The oldest DOM mutation event in the queue. DOM mutation events have the following data members:
- target - The DOM object that is the target of the mutation event.
- parentNode - The DOM object that is the parentNode of the target of the mutation event.
- closestAtomicLiveRegion - The DOM object that is the closest atomic live region to the event; if atomic="false", then the closest atomic live region is the closest element that has at least one of the WAI-ARIA live properties. If no WAI-ARIA live region properties are used, then this will be null.
- type - Text string. "change", "insertion", or "removal"
- preText - Text string. Text content right before the event.
- postText - Text string. Text content right after the event.
- politeness - Text string. "off", "polite", "assertive", or "rude". This can also be "unknown" if there is no WAI-ARIA live= markup used.
- atomic - Boolean. True or false.
- atomicText - Text string. If the event is atomic, then this is the content of the atomic live region that it belongs to; otherwise, this is null.
- relevant - Text string. Any combination of "additions", "removals", and "text".
- interim - Boolean. True or false.
- timestamp - Integer. Time of when the event was added to the DOM mutation events queue.
Error messages:
Additional notes:
- This will NOT remove the oldest DOM mutation event from the queue.
- Returns null if the event queue is empty.
associativeArray CLC_GetNotificationCountsAssociativeArray()
Input parameters:
Return parameter:
- associativeArray - An associative array that indicates how many notifications
of each politeness are in the queue. notificationCountsArray["off"],
notificationCountsArray["polite"], notificationCountsArray["assertive"], and notificationCountsArray["rude"].
Error messages:
Additional notes:
DOMMutationNotification CLC_GetMutationNotification()
Input parameters:
Return parameter:
- DOMMutationNotification - The oldest DOM mutation notification in the queue. DOM mutation notifications have the following data members:
- target - The DOM object that is the target of the mutation notification.
- parentNode - The DOM object that is the parentNode of the target of the mutation notification.
- closestAtomicLiveRegion - The DOM object that is the closest atomic live region to the notification; if atomic="false", then the closest atomic live region is the closest element that has at least one of the WAI-ARIA live properties. If no WAI-ARIA live region properties are used, then this will be null.
- type - Text string. "change", "insertion", or "removal"
- preText - Text string. Text content right before the notification.
- postText - Text string. Text content right after the notification.
- politeness - Text string. "off", "polite", "assertive", or "rude". This can also be "unknown" if there is no WAI-ARIA live= markup used.
- atomic - Boolean. True or false.
- atomicText - Text string. If the notification is atomic, then this is the content of the atomic live region that it belongs to; otherwise, this is null.
- relevant - Text string. Any combination of "additions", "removals", and "text".
- interim - Boolean. True or false.
- timestamp - Integer. Time of when the notification was added to the DOM mutation notifications queue.
Error messages:
Additional notes:
- This will remove the oldest DOM mutation notification from the queue.
- Returns null if the notification queue is empty.
DOMMutationNotification CLC_PeekMutationNotification()
Input parameters:
Return parameter:
- DOMMutationNotification - The oldest DOM mutation notification in the queue. DOM mutation notifications have the following data members:
- target - The DOM object that is the target of the mutation notification.
- parentNode - The DOM object that is the parentNode of the target of the mutation notification.
- closestAtomicLiveRegion - The DOM object that is the closest atomic live region to the notification; if atomic="false", then the closest atomic live region is the closest element that has at least one of the WAI-ARIA live properties. If no WAI-ARIA live region properties are used, then this will be null.
- type - Text string. "change", "insertion", or "removal"
- preText - Text string. Text content right before the notification.
- postText - Text string. Text content right after the notification.
- politeness - Text string. "off", "polite", "assertive", or "rude". This can also be "unknown" if there is no WAI-ARIA live= markup used.
- atomic - Boolean. True or false.
- atomicText - Text string. If the notification is atomic, then this is the content of the atomic live region that it belongs to; otherwise, this is null.
- relevant - Text string. Any combination of "additions", "removals", and "text".
- interim - Boolean. True or false.
- timestamp - Integer. Time of when the notification was added to the DOM mutation notifications queue.
Error messages:
Additional notes:
- This will NOT remove the oldest DOM mutation notification from the queue.
- Returns null if the notification queue is empty.