Skip to content

Commit

Permalink
missing properties addedNodes, removedNodes, previousSibling, and nex…
Browse files Browse the repository at this point in the history
…tSibling added to MutationRecord
  • Loading branch information
rbri committed Jan 20, 2023
1 parent 253280b commit 62a2386
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

<body>
<release version="2.70.0" date="xx, 2023" description="Chrome/Edge 109, Firefox 108, Bugfixes">
<action type="add" dev="rbri">
Missing properties addedNodes, removedNodes, previousSibling, and nextSibling added to MutationRecord.
</action>
<action type="add" dev="rbri" issue="546">"
Anchors are now taking care of the rel="noreferrer" attribute.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public class MutationRecord extends HtmlUnitScriptable {
private String oldValue_;
private String attributeName_;

private NodeList addedNodes_;
private NodeList removedNodes_;
private Node previousSibling_;
private Node nextSibling_;
/**
* Creates an instance.
*/
Expand Down Expand Up @@ -115,4 +119,67 @@ public String getAttributeName() {
return attributeName_;
}

/**
* Sets the {@code addedNodes} property.
* @param addedNodes the {@code addedNodes} property
*/
void setAddedNodes(final NodeList addedNodes) {
addedNodes_ = addedNodes;
}

/**
* @return the {@code addedNodes} property
*/
@JsxGetter
public NodeList getAddedNodes() {
return addedNodes_;
}

/**
* Sets the {@code removedNodes} property.
* @param removedNodes the {@code removedNodes} property
*/
void setRemovedNodes(final NodeList removedNodes) {
removedNodes_ = removedNodes;
}

/**
* @return the {@code removedNodes} property
*/
@JsxGetter
public NodeList getRemovedNodes() {
return removedNodes_;
}

/**
* Sets the {@code previousSibling} property.
* @param removedNodes the {@code previousSibling} property
*/
void setPreviousSibling(final Node previousSibling) {
previousSibling_ = previousSibling;
}

/**
* @return the {@code previousSibling} property
*/
@JsxGetter
public Node getPreviousSibling() {
return previousSibling_;
}

/**
* Sets the {@code nextSibling} property.
* @param removedNodes the {@code nextSibling} property
*/
void setNextSibling(final Node nextSibling) {
nextSibling_ = nextSibling;
}

/**
* @return the {@code nextSibling} property
*/
@JsxGetter
public Node getNextSibling() {
return nextSibling_;
}
}

0 comments on commit 62a2386

Please sign in to comment.