UNPKG

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.

28 lines (25 loc) 693 B
import Node from '../nodes/node/Node.js'; /** * MutationRecord is a model for a mutation. * * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord */ export default class MutationRecord { public type: string = null; public target: Node = null; public addedNodes: Node[] = []; public removedNodes: Node[] = []; public previousSibling: Node = null; public nextSibling: Node = null; public attributeName: string = null; public attributeNamespace: string = null; public oldValue: string = null; /** * Constructor. * * @param init Options to initialize the mutation record. */ constructor(init?: Partial<MutationRecord>) { Object.assign(this, init); } }