getAttribute( 'class' ); $heading->setAttribute( 'class', 'wp-block-heading' . ( $class ? ' ' . \trim( $class ) : '' ) ); return $dom->saveHTML(); }