Help with Notch/Safe Area Setup

Hello! I’m following this guide: Safe Area | Learn PlayCanvas to try to get a safe area for the notch on my mobile app, but when I copy the script from the example project into my project and parse the code, I get an error, is there something I’m missing here?

Specifically getting “Uncaught ReferenceError: document is not defined”

Nevermind, it works, that error doesn’t effect anything I guess

I’ve updated the script so that it can be parsed by the editor now.

Thank you!