In React, how to track the location of the new Window, if it location is errorUrl
, it will close the new window
const newWindow = window.open(
`https://discord.com/oauth2/authorize?client_id=${clientId}&scope=bot&permissions=962311146056&guild_id=${guildId}`,
"_blank",
"width=900,height=800"
);
const errorUrl = "https://discord.com/oauth2/error?error=access_denied";
I have using setInterval() but not working
New contributor
d3m0l15h is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.