src/salvation.js
function (event) {
            // Check if the node is a child of the plugin's element.
            if (event.relatedNode === this.element) {
                var attributeValues = event.target.getAttribute("data-validate");
                if (attributeValues !== null) {
                    attributeValues = this.splitStringByComma(attributeValues);
                    for (var x = 0; x < attributeValues.length; x++) {
                        var key = attributeValues[x];
                        if (key === undefined || key === null)
                            continue;
                        this.validate[key].push(event.target);
                    }
                }
                if (event.target.hasAttribute("data-length") &&
                    this.validate["length"].indexOf(event.target) === -1)
                    this.validate["length"].push(event.target);
            }
        }
function (event) {
            // Check if the node is a child of the plugin's element.
            if (event.relatedNode === this.element) {
                var attributeValues = event.target.getAttribute("data-validate");
                if (attributeValues !== null) {
                    attributeValues = this.splitStringByComma(attributeValues);
                    for (var x = 0; x < attributeValues.length; x++) {
                        var key = attributeValues[x];
                        if (key === undefined || key === null)
                            continue;
                        this.validate[key].push(event.target);
                    }
                }
                if (event.target.hasAttribute("data-length") &&
                    this.validate["length"].indexOf(event.target) === -1)
                    this.validate["length"].push(event.target);
            }
        }
function ( event ) { // Check if the node is a child of the plugin's element. if ( event . relatedNode === this . element ) { var attributeValues = event . target . getAttribute ( "data-validate" ) ; if ( attributeValues !== null ) { attributeValues = this . splitStringByComma ( attributeValues ) ; for ( var x = 0 ; x < attributeValues . length ; x ++ ) { var key = attributeValues [ x ] ; if ( key === undefined || key === null ) continue ; this . validate [ key ] . push ( event . target ) ; } } if ( event . target . hasAttribute ( "data-length" ) && this . validate [ "length" ] . indexOf ( event . target ) === - 1 ) this . validate [ "length" ] . push ( event . target ) ; } }
Callback for DOMNodeInserted.
Adds inserted element to the
elements list, if it has the
appropriate attributes.

@param       Event
Callback for DOMNodeInserted . Adds inserted element to the elements list if it has the appropriate attributes .