src/aria/utils/Json.js
function (node, property, recursive, listeners) {
        if (property != null) {
            // add property specific listeners
            listeners = __retrievePropertySpecificListeners(node, property, recursive, listeners);
        }

        // recursive check
        if (node[jsonUtils.TEMP_REC_MARKER]) {
            return listeners;
        }

        // add general listeners
        listeners = __retrievePropertySpecificListeners(node, null, recursive, listeners);

        // case parent property is defined: look for "recursive" listener in parent nodes
        var parents = node[jsonUtils.OBJECT_PARENT_PROPERTY];
        if (parents) {
            // mark this node has being visited
            node[jsonUtils.TEMP_REC_MARKER] = true;

            for (var index = 0, parentDesc; parentDesc = parents[index]; index++) {
                listeners = __retrieveListeners(parentDesc.parent, parentDesc.property, true, listeners);
            }
            // at the end, clean recursive markup (only first call will have recursive set to null)
            if (!recursive) {
                __cleanUpRecMarkers(node);
            }
        }

        return listeners;
    }
function (node, property, recursive, listeners) {
        if (property != null) {
            // add property specific listeners
            listeners = __retrievePropertySpecificListeners(node, property, recursive, listeners);
        }

        // recursive check
        if (node[jsonUtils.TEMP_REC_MARKER]) {
            return listeners;
        }

        // add general listeners
        listeners = __retrievePropertySpecificListeners(node, null, recursive, listeners);

        // case parent property is defined: look for "recursive" listener in parent nodes
        var parents = node[jsonUtils.OBJECT_PARENT_PROPERTY];
        if (parents) {
            // mark this node has being visited
            node[jsonUtils.TEMP_REC_MARKER] = true;

            for (var index = 0, parentDesc; parentDesc = parents[index]; index++) {
                listeners = __retrieveListeners(parentDesc.parent, parentDesc.property, true, listeners);
            }
            // at the end, clean recursive markup (only first call will have recursive set to null)
            if (!recursive) {
                __cleanUpRecMarkers(node);
            }
        }

        return listeners;
    }
function ( node , property , recursive , listeners ) { if ( property != null ) { // add property specific listeners listeners = __retrievePropertySpecificListeners ( node , property , recursive , listeners ) ; } // recursive check if ( node [ jsonUtils . TEMP_REC_MARKER ] ) { return listeners ; } // add general listeners listeners = __retrievePropertySpecificListeners ( node , null , recursive , listeners ) ; // case parent property is defined: look for "recursive" listener in parent nodes var parents = node [ jsonUtils . OBJECT_PARENT_PROPERTY ] ; if ( parents ) { // mark this node has being visited node [ jsonUtils . TEMP_REC_MARKER ] = true ; for ( var index = 0 , parentDesc ; parentDesc = parents [ index ] ; index ++ ) { listeners = __retrieveListeners ( parentDesc . parent , parentDesc . property , true , listeners ) ; } // at the end, clean recursive markup (only first call will have recursive set to null) if ( ! recursive ) { __cleanUpRecMarkers ( node ) ; } } return listeners ; }
Retrieve listeners in node and its parents
@private
@param {Object} node
@param {String} property (may be null, for changes which are not related to a specific property, e.g. splice on
an array)
@param {Boolean} retrieve recursive listeners only, default is false
@param {Array} listeners
Retrieve listeners in node and its parents