Add callback feature
Callback example:
onChangeFullScreen = function() {
const element = document.getElementById('something');
toggleFullscreen(element, function(isFullScreen) {
if (isFullScreen) {
// any process in fullscreen mode
// e.g.document.addEventListener('keydown', this.keydownEvent);
} else {
// any process in non-fullscreen mode
// e.g.document.removeEventListener('keydown', this.keydownEvent);
}
});
};