brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 45 forks source link

'targetOrigin' not initialized when handling web events #407

Closed anzook closed 2 years ago

anzook commented 2 years ago

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.

jpolitz commented 2 years ago

Thanks! I'm not sure how this worked in testing; the setting of POSTMESSAGE_URL was happening too late. Fixed by https://github.com/brownplt/code.pyret.org/commit/b6036e53736fcf0e547bf80d9c2965265919fcc9

anzook commented 2 years ago

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