JavaScript display and grading problem on different domain

I’m trying to host a “javascript display and grading” problem on my website so I don’t have to re-upload it to the course assets of all the courses that use it each time I edit the problem.

The problem I’m running into is that the JavaScript Display and Grading problem tries to access the getGrade (gradefn) function inside the iFrame and is not allowed to do so. As far as I know, the only way to do this right with iFrames on different domains is by using postMessage on the iframe. Is this supported by the javascript display and grading problem? Is there any way I can also still save and get the state of the problem if I manage to hack postMessage support into it?

Thanks in advance to anyone who can get me on the road to a fix!