src/index.js
/**
 * Destroy Speech instances in element.
 *
 * @param {Element} element         - Element to look for content.
 * @param {string}  contentSelector - Selector for content elements.
 */
Destroy Speech instances in element.
@param {Element} element         - Element to look for content.
@param {string}  contentSelector - Selector for content elements.
Destroy Speech instances in element . @param { Element } element - Element to look for content . @param { string } contentSelector - Selector for content elements .
function destroySpeeches( { element, contentSelector } ) {
	const speechRoots = findContentRoots( element, contentSelector );
	for ( const rootElement of speechRoots ) {
		const speech = speechRootMap.get( rootElement );
		if ( speech ) {
			speech.destroy();
			speechRootMap.delete( rootElement );
		}
	}
}
function destroySpeeches ( { element , contentSelector } ) { const speechRoots = findContentRoots ( element , contentSelector ) ; for ( const rootElement of speechRoots ) { const speech = speechRootMap . get ( rootElement ) ; if ( speech ) { speech . destroy ( ) ; speechRootMap . delete ( rootElement ) ; } } }
Destroy Speech instances in element.
Destroy Speech instances in element .