import { createApp , VNodeTypes } from 'vue' ; let container ; export default function getInnerText ( node ) { if ( ! node ) return '' ; if ( ! container ) { container = document . createElement ( 'div' ) ; container . setAttribute ( 'aria-hidden' , 'true' ) ; document . body . appendChild ( container ) ; } const vm = createApp ( { render ( ) { return < div > { node } < /div>; } } ) ; vm . mount ( container ) ; const text = container . innerText ; vm . unmount ( ) ; return text ; }