public/js/app.js
/**
 * Returns a function to use in pseudos for :enabled/:disabled
 * @param {Boolean} disabled true for :disabled; false for :enabled
 */
Returns a function to use in pseudos for :enabled/:disabled
@param {Boolean} disabled true for :disabled; false for :enabled
Returns a function to use in pseudos for : enabled / : disabled @param { Boolean } disabled true for : disabled ; false for : enabled
function createDisabledPseudo( disabled ) {
	return function( elem ) {
		if ( "form" in elem ) {
			if ( elem.parentNode && elem.disabled === false ) {
				if ( "label" in elem ) {
					if ( "label" in elem.parentNode ) {
						return elem.parentNode.disabled === disabled;
					} else {
						return elem.disabled === disabled;
					}
				}
				return elem.isDisabled === disabled ||
					elem.isDisabled !== !disabled &&
					disabledAncestor( elem ) === disabled;
				}
				return elem.disabled === disabled;
	} else if ( "label" in elem ) {
		return elem.disabled === disabled;
	}
		return false;
	};
}
function createDisabledPseudo ( disabled ) { return function ( elem ) { if ( "form" in elem ) { if ( elem . parentNode && elem . disabled === false ) { if ( "label" in elem ) { if ( "label" in elem . parentNode ) { return elem . parentNode . disabled === disabled ; } else { return elem . disabled === disabled ; } } return elem . isDisabled === disabled || elem . isDisabled !== ! disabled && disabledAncestor ( elem ) === disabled ; } return elem . disabled === disabled ; } else if ( "label" in elem ) { return elem . disabled === disabled ; } return false ; } ; }
Returns a function to use in pseudos for :enabled/:disabled
 @param {Boolean} disabled true for :disabled; false for :enabled
Returns a function to use in pseudos for : enabled / : disabled @param { Boolean } disabled true for : disabled ; false for : enabled
// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable // Only certain elements can match :enabled or :disabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled // Check for inherited disabledness on relevant non-disabled elements: // * listed form-associated elements in a disabled fieldset //   https://html.spec.whatwg.org/multipage/forms.html#category-listed //   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled // * option elements in a disabled optgroup //   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled // All such elements have a "form" property. // Option elements defer to a parent optgroup if present // Support: IE 6 - 11 // Use the isDisabled shortcut property to check for disabled fieldset ancestors // Where there is no isDisabled, check manually /* jshint -W018 */ // Try to winnow out elements that can't be disabled before trusting the disabled property. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't // even exist on them, let alone have a boolean value. // Remaining elements are neither :enabled nor :disabled