Skip to content

Commit

Permalink
TreeWalker.ctor() throws a TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Feb 2, 2025
1 parent 2216ad1 commit 5d34208
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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="4.10.0" date="February xx, 2025" description="Bugfixes">
<action type="fix" dev="rbri">
TreeWalker.ctor() throws a TypeError.
</action>
<action type="fix" dev="rbri">
MutationObserver.observe() throws a TypeError.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,14 @@ public void jsConstructor() {
* or {@code null} to indicate no filter.
* @param expandEntityReferences If false, the contents of
* EntityReference nodes are not present in the logical view.
* @throws DOMException on attempt to create a TreeWalker with a root that
* is {@code null}.
*/
public TreeWalker(final Node root,
final int whatToShow,
final org.w3c.dom.traversal.NodeFilter filter,
final boolean expandEntityReferences) throws DOMException {
final boolean expandEntityReferences) {
super();
if (root == null) {
throw JavaScriptEngine.throwAsScriptRuntimeEx(new DOMException(DOMException.NOT_SUPPORTED_ERR,
"root must not be null"));
throw JavaScriptEngine.typeError("root must not be null");
}
walker_ = new HtmlDomTreeWalker(root.getDomNodeOrDie(), whatToShow, filter, expandEntityReferences);
}
Expand Down

0 comments on commit 5d34208

Please sign in to comment.