I'm facing an unexpected behavior and wanted to be sure i'm not missing something before i'm filling a bug.
I've played with requestFullscreen
on chrome
and firefox
and noticed it's not returning a promise like stated in the spec.
Example for webkit
:
el.addEventListener('click', () => {
const p = el.webkitRequestFullScreen();
p.then(() => {console.log('full screen')});
});
I'm getting:
Uncaught TypeError: Cannot read property 'then' of undefined at HTMLDivElement.el.addEventListener
Same goes for firefox
:
el.addEventListener('click', () => {
const p = el.mozRequestFullScreen();
p.then(() => {console.log('full screen')});
});
TypeError: p is undefined
Am i reading the spec wrong? shouldn't i expect that promise?