I'm trying to call a javascript function from within VB6.


Details:


* The javascript function is contained in a file named "htmlparser.js" and this file is installed along side the .EXE file when the application is installed.


* The function is called "parse" and it takes 2 parameters: URL and HTML


The function call looks like this:


Code:
htmlparser.parse(url, {html: '<html><body><p>Some HTML to be Parsed</p></body></html>',}).then(result => console.log(result));
How can I call this function from VB6 and retrieve the result into a string variable? Do I use .execscript or wscript or what?


TIA