
js.Fullscreen.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xtest Show documentation
Show all versions of xtest Show documentation
A TDD framework to make coding drven by specifications easier
//
// stubbing document to support fullscreen
//
document.originalGetElementById = document.getElementById;
document.fullscreenEnabled = true;
Object.defineProperty(document, 'fullscreenElement', {
value: null,
writable: true,
configurable: true
});
document.exitFullscreen = function() {
document.fullscreenElement = null;
};
document.getElementById = function(id) {
const e = document.originalGetElementById(id);
if (e) {
e.requestFullscreen = function() {
document.fullscreenElement = this;
};
}
return e;
};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy