UNPKG
window
Version:
latest (4.2.7)
4.2.7
4.2.6
4.2.5
4.2.4
4.2.3
4.2.2
4.2.1
4.2.0
4.1.2
4.1.1
4.1.0
4.0.1
4.0.0
3.1.6
3.1.5
3.1.4
3.1.3
3.1.2
3.1.1
3.1.0
3.0.0
2.0.2
2.0.1
2.0.0
1.0.0
Exports a jsdom window object.
github.com/lukechilds/window
lukechilds/window
window
/
src
/
index.js
10 lines
(8 loc)
•
221 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
const
{
JSDOM
} =
require
(
'jsdom'
);
// Class to return a window instance.
// Accepts a jsdom config object.
module
.
exports
=
class
Window
{
constructor
(
jsdomConfig
) {
return
(
new
JSDOM
(
''
, jsdomConfig)).
window
; } };