Parent value string contains an invalid character

Investigating and solving the issue requires looking at the problem inside the environment. So without the “live page” to look at I can’t trace the issue.

The code you presented looks correct. So this suggests some kind of problem with the environment. Likely nested iFrames, but if the code is on Github then that doesn’t seem likely. So I need to check the environment, which I can’t without the page being live