Hi Gert - I don't think there is an easy way. Perhaps you could have the JS create a new invisible HTML element, write the output into it, and then use a BP read stage to extract it? Not very elegant but it might work. Perhaps there is some 3rd party library for this sort of thing?