brownplt/code.pyret.org

'targetOrigin' not initialized when handling web events

Closed this issue · 2 comments

Pyret editor error due to 'targetOrigin' not being initialized within events.js (possibly POSTMESSAGE_ORIGIN is undef)

Screen Shot 2021-11-06 at 11 21 13 PM

Currently experiencing the error when trying to use the editor as an embedded iFrame (no error on standalone editor), such as within vmt. Error occurs and is visible in console logs on any user event within the embedded editor.

I was not able to get a local (:5000) host build running to test and diagnose, but I will update as I'm able.

Thanks! I'm not sure how this worked in testing; the setting of POSTMESSAGE_URL was happening too late. Fixed by b6036e5

Confirmed working in partner app with the fix in deployment! Thanks