src/js/widgets-controller.js
function _getElements( group, selector ) {
    if ( selector ) {
        if ( selector === 'form' ) {
            return [ formHtml ];
        }
        // e.g. if the widget selector starts at .question level (e.g. ".or-appearance-draw input")
        if ( group.classList.contains( 'question' ) ) {
            return [ ...group.querySelectorAll( 'input:not(.ignore), select:not(.ignore), textarea:not(.ignore)' ) ]
                .filter( el => el.matches( selector ) );
        }
        return [ ...group.querySelectorAll( selector ) ];
    }

    return [];
}
function _getElements( group, selector ) {
    if ( selector ) {
        if ( selector === 'form' ) {
            return [ formHtml ];
        }
        // e.g. if the widget selector starts at .question level (e.g. ".or-appearance-draw input")
        if ( group.classList.contains( 'question' ) ) {
            return [ ...group.querySelectorAll( 'input:not(.ignore), select:not(.ignore), textarea:not(.ignore)' ) ]
                .filter( el => el.matches( selector ) );
        }
        return [ ...group.querySelectorAll( selector ) ];
    }

    return [];
}
function _getElements ( group , selector ) { if ( selector ) { if ( selector === 'form' ) { return [ formHtml ] ; } // e.g. if the widget selector starts at .question level (e.g. ".or-appearance-draw input") if ( group . classList . contains ( 'question' ) ) { return [ ... group . querySelectorAll ( 'input:not(.ignore), select:not(.ignore), textarea:not(.ignore)' ) ] . filter ( el => el . matches ( selector ) ) ; } return [ ... group . querySelectorAll ( selector ) ] ; } return [ ] ; }
Returns the elements on which to apply the widget

@param  {Element} group   a jQuery-wrapped element
@param  {string} selector if the selector is null, the form element will be returned
@return {jQuery}          a jQuery collection
Returns the elements on which to apply the widget