зеркало из https://github.com/mozilla/gecko-dev.git
17 строки
475 B
JavaScript
17 строки
475 B
JavaScript
function specialPowersLock(orientation) {
|
|
return SpecialPowers.pushPrefEnv({
|
|
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
|
|
}).then(function() => {
|
|
var p = screen.orientation.lock(orientation);
|
|
});
|
|
}
|
|
|
|
function specialPowersUnlock() {
|
|
return SpecialPowers.pushPrefEnv({
|
|
'set': [ ["dom.screenorientation.testing.non_fullscreen_lock_allow", true] ]
|
|
}).then(function() {
|
|
screen.orientation.unlock();
|
|
resolve();
|
|
});
|
|
}
|