happy-dom-without-node
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.
24 lines (21 loc) • 536 B
text/typescript
import EventTarget from '../event/EventTarget.js';
import Event from '../event/Event.js';
/**
* Permission status.
*
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus
*/
export default class PermissionStatus extends EventTarget {
public state: 'granted' | 'denied' | 'prompt';
public onchange: ((event: Event) => void) | null = null;
/**
* Constructor.
*
* @param [state] State.
*/
constructor(state: 'granted' | 'denied' | 'prompt' = 'granted') {
super();
this.state = state;
}
}