How are DOM objects passed by ZU.processDocuments?

Hi all, I'm cooking up a web translator and have encountered difficulties when multiple items are passed to scrape().

I've located the problem in a ZU.xpath(**xpath**, "@href") expression that evaluates as a string when doWeb() calls scrape(doc, url) but evaluates as an Object when doWeb calls ZU.processDocuments(articles, scrape). This problem first appears at line 84 of the link below. Any ideas on how to get around this? This translator is my first foray into JavaScript, so there may be a simple Object method that I'm not aware of.

Thanks as always.

--------------------
translator: https://raw.githubusercontent.com/runkelcorey/translators/1ded2c28f0b00e37c289c9499bda88d52641a8b4/ypfs.js

Attempted solutions:
* JSON.stringify(ZU.xpath(.))
* ZU.xpath(.).toString()
* ZU.xpath(.)[0]

How I localized to ZU.xpath():
* itemType() works when doWeb() calls scrape(doc, url)
* not a problem with calling other functions when doWeb() calls ZU.processDocuments() since I can call getLocale() just fine
* declaring each item to be [Zotero] type document does not solve any problems
This discussion has been closed.