My code:
SET !VAR2 EVAL ("var title = document.getElementById(\"meta\").innerText; localStorage.setItem(\"title\", title);")
Imacros console output:
TypeError: result is undefined, line: 13
This is works for me:
// get text from div with #divid
TAG POS=1 TYPE=DIV ATTR=ID:divid EXTRACT=TXT
SET !VAR2 {{!EXTRACT}}
// set text to localStorage
SET !VAR2 EVAL ("localStorage.setItem('title', \"{{!VAR2}}\"); \"{{!VAR2}}\";")
// reset iMacros variables for later use
SET !VAR2 NULL
SET !EXTRACT NULL