Use correct document when creating elements
This commit is contained in:
@@ -13,7 +13,8 @@ export class CoreBrowserService implements ICoreBrowserService {
|
||||
|
||||
constructor(
|
||||
private _textarea: HTMLTextAreaElement,
|
||||
public readonly window: Window & typeof globalThis
|
||||
public readonly window: Window & typeof globalThis,
|
||||
public readonly mainDocument: Document
|
||||
) {
|
||||
this._textarea.addEventListener('focus', () => this._isFocused = true);
|
||||
this._textarea.addEventListener('blur', () => this._isFocused = false);
|
||||
|
||||
@@ -34,6 +34,11 @@ export interface ICoreBrowserService {
|
||||
* window.
|
||||
*/
|
||||
readonly window: Window & typeof globalThis;
|
||||
/**
|
||||
* The document of the primary window if working with multiple windows. This
|
||||
* is set by the documentOverride setting.
|
||||
*/
|
||||
readonly mainDocument: Document;
|
||||
/**
|
||||
* Helper for getting the devicePixelRatio of the parent window.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user