Skip to content

Commit db2c556

Browse files
committed
toJSON() implementation improved
1 parent 3814236 commit db2c556

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<body>
1010
<release version="4.21.0" date="December xx, 2025" description="Firefox 145, core-js, Bugfixes">
11+
<action type="update" dev="rbri">
12+
DOMPointReadOnly, DOMRectReadOnly, DOMMatrixReadOnly, and PerformanceNavigation toJSON() implementation improved.
13+
</action>
1114
<action type="update" dev="rbri">
1215
DOMPointReadOnly and DOMPoint implementation improved.
1316
</action>

src/main/java/org/htmlunit/javascript/host/performance/PerformanceNavigation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public int getRedirectCount() {
8383
* @return the {@code toJSON} object
8484
*/
8585
@JsxFunction
86-
public Object toJSON() {
86+
public Scriptable toJSON() {
8787
final Scriptable json = JavaScriptEngine.newObject(getParentScope());
8888
json.put("type", json, getType());
8989
json.put("redirectCount", json, getRedirectCount());

src/test/java/org/htmlunit/archunit/ArchitectureTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,6 @@ public boolean test(final JavaClass javaClass) {
355355
.and().doNotHaveFullName("org.htmlunit.javascript.host.worker.DedicatedWorkerGlobalScope.setTimeout(org.htmlunit.corejs.javascript.Context, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.Scriptable, [Ljava.lang.Object;, org.htmlunit.corejs.javascript.Function)")
356356
.and().doNotHaveFullName("org.htmlunit.javascript.host.xml.XSLTProcessor.getParameter(java.lang.String, java.lang.String)")
357357

358-
.and().doNotHaveFullName("org.htmlunit.javascript.host.performance.PerformanceNavigation.toJSON()")
359-
360358
.should().haveRawReturnType(String.class)
361359
.orShould().haveRawReturnType("int")
362360
.orShould().haveRawReturnType("long")

0 commit comments

Comments
 (0)