ajvijs/events.js
/*
	 * @desc Detect mutation event name and prevent double mutation observer triggering
	 * @param (object) mutation - Mutation object
	 * @param (string) own - Owner
	 * @return string
	 */
@desc Detect mutation event name and prevent double mutation observer triggering
@param (object) mutation - Mutation object
@param (string) own - Owner
@return string
@desc Detect mutation event name and prevent double mutation observer triggering @param ( object ) mutation - Mutation object @param ( string ) own - Owner @return string
observableEventType(mutation, own) {	
		switch(mutation.type) {
			case 'childList':
				if(mutation.addedNodes.length > 0 && mutation.addedNodes[mutation.addedNodes.length - 1].nodeType == 1) {
					return 'add'
				}
				if(mutation.removedNodes.length > 0 && mutation.removedNodes[mutation.removedNodes.length - 1].nodeType == 1) {
					return 'remove'
				}
			break
			case 'attributes':
				if(mutation.attributeName == 'style') {
					switch(getComputedStyle(mutation.target).getPropertyValue('display')) {
						case 'block':
							return 'show'
						break
						case 'none':
							return 'hide'
						break
					}
					switch(getComputedStyle(mutation.target).getPropertyValue('visibility')) {
						case 'visible':
							return 'show'
						break
						case 'hidden':
							return 'hide'
						break
					}
				}
			break
		}
	}
observableEventType ( mutation , own ) { switch ( mutation . type ) { case 'childList' : if ( mutation . addedNodes . length > 0 && mutation . addedNodes [ mutation . addedNodes . length - 1 ] . nodeType == 1 ) { return 'add' } if ( mutation . removedNodes . length > 0 && mutation . removedNodes [ mutation . removedNodes . length - 1 ] . nodeType == 1 ) { return 'remove' } break case 'attributes' : if ( mutation . attributeName == 'style' ) { switch ( getComputedStyle ( mutation . target ) . getPropertyValue ( 'display' ) ) { case 'block' : return 'show' break case 'none' : return 'hide' break } switch ( getComputedStyle ( mutation . target ) . getPropertyValue ( 'visibility' ) ) { case 'visible' : return 'show' break case 'hidden' : return 'hide' break } } break } }
@desc Detect mutation event name and prevent double mutation observer triggering
 @param (object) mutation - Mutation object
 @param (string) own - Owner
 @return string
@desc Detect mutation event name and prevent double mutation observer triggering @param ( object ) mutation - Mutation object @param ( string ) own - Owner @return string