Skip to content

Commit

Permalink
port missing function
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Mar 20, 2024
1 parent 35651be commit b36e157
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/mock-doc/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import { MockDocumentFragment } from './document-fragment';
import { MockDocumentTypeNode } from './document-type-node';
import { createElement, createElementNS, MockBaseElement } from './element';
import { resetEventListeners } from './event';
import { MockElement, MockHTMLElement, MockTextNode, resetElement } from './node';
import { MockElement, MockHTMLElement, MockNode, MockTextNode, resetElement } from './node';
import { parseHtmlToFragment } from './parse-html';
import { parseDocumentUtil } from './parse-util';
import { MockWindow } from './window';
import { MockNode } from './node';

export class MockDocument extends MockNode {
defaultView: any;
Expand Down
8 changes: 4 additions & 4 deletions src/mock-doc/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export class MockNode {
addEventListener(this, type, handler);
}

removeEventListener(type: string, handler: any) {
removeEventListener(this, type, handler);
}

dispatchEvent(ev: MockEvent) {
return dispatchEvent(this, ev);
}
Expand Down Expand Up @@ -651,10 +655,6 @@ Testing components with ElementInternals is fully supported in e2e tests.`,
}
}

removeEventListener(type: string, handler: any) {
removeEventListener(this, type, handler);
}

setAttribute(attrName: string, value: any) {
if (attrName === 'style') {
this.style = value;
Expand Down

0 comments on commit b36e157

Please sign in to comment.