-1👍
✅
Finally this work for me
document.querySelector("#toFull").addEventListener("fullscreenchange", function (event) {
if (document.fullscreenElement) {
document.querySelector("#exitFullScreen").style.display = "block";
} else {
document.querySelector("#exitFullScreen").style.display = "none";
}
});
Source:stackexchange.com