我编写了一个正确加载的函数(请参阅顶部的 hokey 警报),该函数继续调用 SP.SOD.executeFunc 以检查设备是否为 ipad,然后调用 SetFullScreenMode(true);
window.onload = function () {
alert('has loaded');
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', goToFullScreen);
function goToFullScreen() {
alert('never gets called on an iPad'); // doesn't matter if isiPad is correct, this should at least happen
var isiPad = navigator.userAgent.indexOf('iPad') != -1;
if(isiPad) {
SetFullScreenMode(true);
}
}
};
它在 Chrome 和 IE8 中运行良好,但在 iPad 中不起作用,因此 executeFunc 有任何特定的浏览器要求。出现“已加载”消息,但没有执行任何其他操作。
有什么建议么?