full screen
var body = document.documentElement;
if (body.requestFullScreen) {
body.requestFullScreen();
}
Thursday, May 16, 13
full screen
var body = document.documentElement;
if (body.requestFullScreen) {
body.requestFullScreen();
} else if (body.webkitRequestFullScreen) {
body.webkitRequestFullScreen();
}
Thursday, May 16, 13
full screen
var body = document.documentElement;
if (body.requestFullScreen) {
body.requestFullScreen();
} else if (body.webkitRequestFullScreen) {
body.webkitRequestFullScreen();
} else if (body.mozRequestFullScreen) {
body.mozRequestFullScreen();
}
Thursday, May 16, 13
hi res canvas
var devPxRatio = window.devicePixelRatio;
var canvasPxRatio =
document.querySelector("canvas")
.getContext("2d")
.webkitBackingStorePixelRatio;
Thursday, May 16, 13
hi res canvas
<canvas width="300" height="200">
</canvas>
300px
devPxRatio = 2
canvasPxRatio = 1
Thursday, May 16, 13
hi res canvas
<canvas width="300" height="200">
</canvas>
300px
devPxRatio >= 1
canvasPxRatio = undefined
Thursday, May 16, 13
we need hacks because
• browsers are different
• no enough information
• undocumented features
• buggy
Thursday, May 16, 13
however
• usability and Performance matters
• be careful
• your app should work anyway
• use feature detection
Thursday, May 16, 13
1 fullscreen
2 snapped mode
3 hires canvas
4 numeric field
5 rich editor
6 background tab
7 images & densities
8 html media capture
9 push notification
A home screen title
B live tile
C storage limits
D bandwidth simulators
E virtual mobile labs
F live reload
Thursday, May 16, 13