Javascript-форум (https://javascript.ru/forum/)
-   Мобильный JavaScript (https://javascript.ru/forum/mobile/)
-   -   Адресная строка Chrome IPhone 6+ (https://javascript.ru/forum/mobile/80485-adresnaya-stroka-chrome-iphone-6-a.html)

Master11 10.06.2020 19:02

Адресная строка Chrome IPhone 6+
 
Здравствуйте!
Помогите, плиз, очень нужно сделать веб-приложение полноекранным...
Как убрать адресную строку на Iphone Chrome ?
Спасибо

laimas 10.06.2020 21:51

https://habr.com/ru/post/184926/

Master11 10.06.2020 22:30

Спасибо, но этот метод работает только для андроида отлично. Айфон не реагирует. я как раз так и делаю.... но без результата нужного (((

laimas 10.06.2020 22:38

Это не работает?

https://developer.apple.com/document...nterfullscreen

Версии соответствуют?

Master11 11.06.2020 10:47

Цитата:

Сообщение от laimas (Сообщение 525677)
Это не работает?

https://developer.apple.com/document...nterfullscreen

Версии соответствуют?

let btn = document.getElementById('id_menu');
let element = document.body;
btn.addEventListener("click", function() {
if (element.requestFullscreen) { // W3C API
element.requestFullscreen();
} else if (element.mozRequestFullScreen) { // Mozilla current API
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) { // Webkit current API
element.webkitRequestFullScreen();
} // Maybe other prefixed APIs?
else {
alert('not support');
}
}, false);

получаю "not support"
может не к <body> привязку делать?

Master11 11.06.2020 10:50

Цитата:

Сообщение от Master11 (Сообщение 525694)
let btn = document.getElementById('id_menu');
let element = document.body;
btn.addEventListener("click", function() {
if (element.requestFullscreen) { // W3C API
element.requestFullscreen();
} else if (element.mozRequestFullScreen) { // Mozilla current API
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) { // Webkit current API
element.webkitRequestFullScreen();
} // Maybe other prefixed APIs?
else {
alert('not support');
}
}, false);

получаю "not support"
может не к <body> привязку делать?

клиент:
Mozilla/5.0 (iPhone; CPU iPhone OS 13_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/83.0.4103.88 Mobile/15E148 Safari/604.1

laimas 11.06.2020 14:38

https://developer.apple.com/document...uestfullscreen


Часовой пояс GMT +3, время: 03:35.