Optional
element: Elementthe element to be set in full-screen mode.
device
// add a keyboard shortcut to toggle Fullscreen mode on/off
me.input.bindKey(me.input.KEY.F, "toggleFullscreen");
me.event.on(me.event.KEYDOWN, function (action, keyCode, edge) {
// toggle fullscreen on/off
if (action === "toggleFullscreen") {
me.device.requestFullscreen();
} else {
me.device.exitFullscreen();
}
});
Triggers a fullscreen request. Requires fullscreen support from the browser/device.