45
rated 0 times
[
49]
[
4]
/ answers: 1 / hits: 17001
/ 6 Years ago, tue, august 28, 2018, 12:00:00
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?
More From » google-chrome