File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 4
4
"url" : " fullscreen" ,
5
5
"tags" : " fullscreen" ,
6
6
"support" : {
7
- "live" : " opera" ,
8
- "nightly" : " chrome firefox safari "
7
+ "live" : " opera chrome firefox safari " ,
8
+ "nightly" : " "
9
9
},
10
- "test" : " "
10
+ "test" : " document.body.requestFullscreen !== undefined "
11
11
},
12
12
{
13
13
"desc" : " Stream video and filter with canvas" ,
Original file line number Diff line number Diff line change 12
12
< p > This example shows how an element can request fullscreen support from the browser.</ p >
13
13
< p id ="unavailable "> Not supported :(</ p >
14
14
< div id ="game ">
15
-
15
+ < button id ="gofull "> Go fullscreen</ button >
16
+ < button id ="goback "> Go back to non-fullscreen</ button >
16
17
</ div >
17
18
</ article >
18
19
< script >
39
40
return ! ! shim ( document . body )
40
41
}
41
42
42
- var no = $ ( '#unavailable' ) ;
43
+ var no = $ ( 'unavailable' ) ,
44
+ go = $ ( 'gofull' ) ,
45
+ back = $ ( 'goback' ) ;
43
46
44
47
if ( available ( ) ) {
45
48
no . parentNode . removeChild ( no ) ;
46
49
}
47
50
51
+ go . onclick = function ( ) {
52
+ shim ( this . parentNode ) . call ( this . parentNode ) ;
53
+ }
54
+
48
55
49
56
50
57
You can’t perform that action at this time.
0 commit comments