I'm facing a strange issue with a variable that appears to be a string when alerted, but in the console, it is actually a DOMSelection presented in tree form. How can I retrieve the actual string value from this console output?
DOMSelection
anchorNode: Text
anchorOffset: 36
baseNode: Text
baseOffset: 36
extentNode: Text
extentOffset: 40
focusNode: Text
focusOffset: 40
isCollapsed: false
rangeCount: 1
type: "Range"
__proto__: DOMSelection