Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1156@patch: Add missing html elements from global scope. #1157

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/happy-dom/src/window/Window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ import PermissionStatus from '../permissions/PermissionStatus.js';
import Clipboard from '../clipboard/Clipboard.js';
import ClipboardItem from '../clipboard/ClipboardItem.js';
import ClipboardEvent from '../event/events/ClipboardEvent.js';
import HTMLAnchorElement from '../nodes/html-anchor-element/HTMLAnchorElement.js';
import HTMLButtonElement from '../nodes/html-button-element/HTMLButtonElement.js';
import HTMLOptGroupElement from '../nodes/html-opt-group-element/HTMLOptGroupElement.js';
import HTMLOptionElement from '../nodes/html-option-element/HTMLOptionElement.js';

const ORIGINAL_SET_TIMEOUT = setTimeout;
const ORIGINAL_CLEAR_TIMEOUT = clearTimeout;
Expand Down Expand Up @@ -269,6 +273,10 @@ export default class Window extends EventTarget implements IWindow {
public readonly HTMLBaseElement = HTMLBaseElement;
public readonly HTMLIFrameElement = HTMLIFrameElement;
public readonly HTMLDialogElement = HTMLDialogElement;
public readonly HTMLOptGroupElement = HTMLOptGroupElement;
public readonly HTMLOptionElement = HTMLOptionElement;
public readonly HTMLAnchorElement = HTMLAnchorElement;
public readonly HTMLButtonElement = HTMLButtonElement;

// Non-implemented element classes
public readonly HTMLHeadElement = HTMLElement;
Expand All @@ -284,10 +292,8 @@ export default class Window extends EventTarget implements IWindow {
public readonly HTMLMenuElement = HTMLElement;
public readonly HTMLDListElement = HTMLElement;
public readonly HTMLDivElement = HTMLElement;
public readonly HTMLAnchorElement = HTMLElement;
public readonly HTMLAreaElement = HTMLElement;
public readonly HTMLBRElement = HTMLElement;
public readonly HTMLButtonElement = HTMLElement;
public readonly HTMLCanvasElement = HTMLElement;
public readonly HTMLDataElement = HTMLElement;
public readonly HTMLDataListElement = HTMLElement;
Expand Down