client/components/tinymce/plugins/wpcom-view/plugin.js
function getParent( node, className ) {
		while ( node && node.parentNode ) {
			if (
				node.className &&
				( ' ' + node.className + ' ' ).indexOf( ' ' + className + ' ' ) !== -1
			) {
				return node;
			}

			node = node.parentNode;
		}

		return false;
	}
function getParent( node, className ) {
		while ( node && node.parentNode ) {
			if (
				node.className &&
				( ' ' + node.className + ' ' ).indexOf( ' ' + className + ' ' ) !== -1
			) {
				return node;
			}

			node = node.parentNode;
		}

		return false;
	}
function getParent ( node , className ) { while ( node && node . parentNode ) { if ( node . className && ( ' ' + node . className + ' ' ) . indexOf ( ' ' + className + ' ' ) !== - 1 ) { return node ; } node = node . parentNode ; } return false ; }
Returns the node or a parent of the node that has the passed className.
Doing this directly is about 40% faster.

@param {object} node The node to search.
@param {string} className The class name to search for.

@return {object|boolean} A node on success; false on failure.
Returns the node or a parent of the node that has the passed className . Doing this directly is about 40% faster .