function patchDOMProp(el, key, value, 
// the following args are passed only due to potential innerHTML/textContent
// overriding existing VNodes, in which case the old tree must be properly
// unmounted.
prevChildren, parentComponent, parentSuspense, unmountChildren) {
    if (key === 'innerHTML' || key === 'textContent') {
        if (prevChildren) {
            unmountChildren(prevChildren, parentComponent, parentSuspense);
        }
        el[key] = value == null ? '' : value;
        return;
    }
    if (key === 'value' && el.tagName !== 'PROGRESS') {
        // store value as _value as well since
        // non-string values will be stringified.
        el._value = value;
        const newValue = value == null ? '' : value;
        if (el.value !== newValue) {
            el.value = newValue;
        }
        return;
    }
    if (value === '' || value == null) {
        const type = typeof el[key];
        if (value === '' && type === 'boolean') {
            // e.g. <select multiple> compiles to { multiple: '' }
            el[key] = true;
            return;
        }
        else if (value == null && type === 'string') {
            // e.g. <div :id="null">
            el[key] = '';
            el.removeAttribute(key);
            return;
        }
        else if (type === 'number') {
            // e.g. <img :width="null">
            el[key] = 0;
            el.removeAttribute(key);
            return;
        }
    }
    // some properties perform value validation and throw
    try {
        el[key] = value;
    }
    catch (e) {
        {
            warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
                `value ${value} is invalid.`, e);
        }
    }
}
// functions. The user is responsible for using them with only trusted content.
functions. The user is responsible for using them with only trusted content.
functions . The user is responsible for using them with only trusted content .
function patchDOMProp(el, key, value, 
prevChildren, parentComponent, parentSuspense, unmountChildren) {
    if (key === 'innerHTML' || key === 'textContent') {
        if (prevChildren) {
            unmountChildren(prevChildren, parentComponent, parentSuspense);
        }
        el[key] = value == null ? '' : value;
        return;
    }
    if (key === 'value' && el.tagName !== 'PROGRESS') {
        el._value = value;
        const newValue = value == null ? '' : value;
        if (el.value !== newValue) {
            el.value = newValue;
        }
        return;
    }
    if (value === '' || value == null) {
        const type = typeof el[key];
        if (value === '' && type === 'boolean') {
            el[key] = true;
            return;
        }
        else if (value == null && type === 'string') {
            el[key] = '';
            el.removeAttribute(key);
            return;
        }
        else if (type === 'number') {
            el[key] = 0;
            el.removeAttribute(key);
            return;
        }
    }
    try {
        el[key] = value;
    }
    catch (e) {
        {
            warn(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
                `value ${value} is invalid.`, e);
        }
    }
}
function patchDOMProp ( el , key , value , prevChildren , parentComponent , parentSuspense , unmountChildren ) { if ( key === 'innerHTML' || key === 'textContent' ) { if ( prevChildren ) { unmountChildren ( prevChildren , parentComponent , parentSuspense ) ; } el [ key ] = value == null ? '' : value ; return ; } if ( key === 'value' && el . tagName !== 'PROGRESS' ) { el . _value = value ; const newValue = value == null ? '' : value ; if ( el . value !== newValue ) { el . value = newValue ; } return ; } if ( value === '' || value == null ) { const type = typeof el [ key ] ; if ( value === '' && type === 'boolean' ) { el [ key ] = true ; return ; } else if ( value == null && type === 'string' ) { el [ key ] = '' ; el . removeAttribute ( key ) ; return ; } else if ( type === 'number' ) { el [ key ] = 0 ; el . removeAttribute ( key ) ; return ; } } try { el [ key ] = value ; } catch ( e ) { { warn ( ` ${ key } ${ el . tagName . toLowerCase ( ) } ` + ` ${ value } ` , e ) ; } } }
functions.
functions .
// the following args are passed only due to potential innerHTML/textContent // overriding existing VNodes, in which case the old tree must be properly // unmounted. // store value as _value as well since // non-string values will be stringified. // e.g. <select multiple> compiles to { multiple: '' } // e.g. <div :id="null"> // e.g. <img :width="null"> // some properties perform value validation and throw