happy-dom
Version:
Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.
23 lines (19 loc) • 503 B
text/typescript
import UIEvent from '../UIEvent.js';
import EventTarget from '../EventTarget.js';
import IFocusEventInit from './IFocusEventInit.js';
/**
*
*/
export default class FocusEvent extends UIEvent {
public readonly relatedTarget: EventTarget | null;
/**
* Constructor.
*
* @param type Event type.
* @param [eventInit] Event init.
*/
constructor(type: string, eventInit: IFocusEventInit | null = null) {
super(type, eventInit);
this.relatedTarget = eventInit?.relatedTarget ?? null;
}
}