Using Firebase initializeAppCheck() with wix website

Question:
Using Firebase initializeAppCheck() returns “ReferenceError: document is not defined”. does anyone have an expertise getting initializeAppCheck() to work with Wix? I think it is a must have for a secure application. All of my other firebase code is working properly running on each page on ready scripts. Here is my try catch block running in the on ready script
try{
appCheck = initializeAppCheck(app, {
provider: new ReCaptchaV3Provider(myKey),
isTokenAutoRefreshEnabled: true
});
}
catch(err){
console.log(“appcheck error is:”, err);
}