1 | export class OptionsReader {
|
2 | constructor(globalContext) {
|
3 | this.globalContext = globalContext;
|
4 | }
|
5 | get window() {
|
6 | if (this.globalContext) {
|
7 | return this.globalContext;
|
8 | }
|
9 | else if (typeof window !== 'undefined') {
|
10 | return window;
|
11 | }
|
12 | return undefined;
|
13 | }
|
14 | get document() {
|
15 | if (this.window) {
|
16 | return this.window.document;
|
17 | }
|
18 | return undefined;
|
19 | }
|
20 | }
|