blob: 2d87cf7207e3375413d02a4109b0c33f0fc5944a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
function specialPowersLock(orientation) {
return new Promise(function(resolve, reject) {
SpecialPowers.pushPrefEnv({
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
}, function() {
var p = screen.orientation.lock(orientation);
resolve(p);
});
});
}
function specialPowersUnlock() {
return new Promise(function(resolve, reject) {
SpecialPowers.pushPrefEnv({
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
}, function() {
screen.orientation.unlock();
resolve();
});
});
}
|