Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 18, 2024
1 parent b92b02e commit e37b9ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 2 additions & 6 deletions src/main/java/org/htmlunit/javascript/host/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -1080,12 +1080,8 @@ public void setId(final String newId) {
@JsxFunction
public void removeAttributeNode(final Attr attribute) {
final String name = attribute.getName();
final Object namespaceUri = attribute.getNamespaceURI();
if (namespaceUri instanceof String) {
removeAttributeNS((String) namespaceUri, name);
return;
}
removeAttributeNS(null, name);
final String namespaceUri = attribute.getNamespaceURI();
removeAttributeNS(namespaceUri, name);
}

/**
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/htmlunit/javascript/host/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -1395,9 +1395,8 @@ public void setOnmessage(final Object onmessage) {
* @param e the error that needs to be reported
*/
public void triggerOnError(final ScriptException e) {
final Object o = getOnerror();
if (o instanceof Function) {
final Function f = (Function) o;
final Function f = getOnerror();
if (f != null) {
String msg = e.getMessage();
final String url = e.getPage().getUrl().toExternalForm();

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/htmlunit/ExternalTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class ExternalTest {
static String MAVEN_REPO_URL_ = "https://repo1.maven.org/maven2/";

/** Chrome driver. */
static String CHROME_DRIVER_ = "130.0.6723";
static String CHROME_DRIVER_ = "131.0.6778";
static String CHROME_DRIVER_URL_ =
"https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json";

Expand Down

0 comments on commit e37b9ac

Please sign in to comment.