PHP 7.4.33
Preview: OptionsReader.ts Size: 933 B
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-dnd-html5-backend/src/OptionsReader.ts
import type { HTML5BackendContext, HTML5BackendOptions } from './types.js'

export class OptionsReader {
	public ownerDocument: Document | null = null
	private globalContext: HTML5BackendContext
	private optionsArgs: HTML5BackendOptions | undefined

	public constructor(
		globalContext: HTML5BackendContext,
		options?: HTML5BackendOptions,
	) {
		this.globalContext = globalContext
		this.optionsArgs = options
	}

	public get window(): Window | undefined {
		if (this.globalContext) {
			return this.globalContext
		} else if (typeof window !== 'undefined') {
			return window
		}
		return undefined
	}

	public get document(): Document | undefined {
		if (this.globalContext?.document) {
			return this.globalContext.document
		} else if (this.window) {
			return this.window.document
		} else {
			return undefined
		}
	}

	public get rootElement(): Node | undefined {
		return this.optionsArgs?.rootElement || this.window
	}
}

Directory Contents

Dirs: 2 × Files: 11
Name Size Perms Modified Actions
- drwxr-xr-x 2025-03-28 11:04:37
Edit Download
utils DIR
- drwxr-xr-x 2025-03-28 11:04:37
Edit Download
326 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
1018 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
269 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
21.24 KB lrw-r--r-- 2025-03-28 11:04:37
Edit Download
611 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
455 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
2.30 KB lrw-r--r-- 2025-03-28 11:04:37
Edit Download
150 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
3.52 KB lrw-r--r-- 2025-03-28 11:04:37
Edit Download
933 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
249 B lrw-r--r-- 2025-03-28 11:04:37
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).