client/lib/media-serialization/strategies/string.js
function parseAsElement( node, _parsed ) {
	// Attempt to convert string element into DOM node. If invalid, this will
	// return a string, not window.Element
	const element = createElementFromString( node );
	if ( element instanceof window.Element ) {
		// Recursing will trigger the DOM strategy
		return _recurse( element, _parsed );
	}

	return _parsed;
}
function parseAsElement( node, _parsed ) {
	// Attempt to convert string element into DOM node. If invalid, this will
	// return a string, not window.Element
	const element = createElementFromString( node );
	if ( element instanceof window.Element ) {
		// Recursing will trigger the DOM strategy
		return _recurse( element, _parsed );
	}

	return _parsed;
}
function parseAsElement ( node , _parsed ) { // Attempt to convert string element into DOM node. If invalid, this will // return a string, not window.Element const element = createElementFromString ( node ) ; if ( element instanceof window . Element ) { // Recursing will trigger the DOM strategy return _recurse ( element , _parsed ) ; } return _parsed ; }
Given a media string, attempts to parse as an HTMLElement and returns an
object containing all detected values.

@param  {string} node    Media object to parse
@param  {Object} _parsed In recursion, the known values
@return {Object}         Object of all detected values
Given a media string attempts to parse as an HTMLElement and returns an object containing all detected values .