Skip to content

Commit f5e15e8

Browse files
committed
SVGDiscardElement added
1 parent 5b7ef20 commit f5e15e8

File tree

7 files changed

+85
-3
lines changed

7 files changed

+85
-3
lines changed

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.12.0" date="April xx, 2025" description="Chrome/Edge 135, Firefox 137, Rhino RegExp, Bugfixes">
11+
<action type="add" dev="rbri">
12+
FF137: SVGDiscardElement added.
13+
</action>
1114
<action type="update" dev="rbri">
1215
Chrome/Edge 135, FF137: Setter validation for length style properties adjusted.
1316
</action>

src/main/java/org/htmlunit/javascript/configuration/JavaScriptConfiguration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@
446446
import org.htmlunit.javascript.host.svg.SVGComponentTransferFunctionElement;
447447
import org.htmlunit.javascript.host.svg.SVGDefsElement;
448448
import org.htmlunit.javascript.host.svg.SVGDescElement;
449+
import org.htmlunit.javascript.host.svg.SVGDiscardElement;
449450
import org.htmlunit.javascript.host.svg.SVGElement;
450451
import org.htmlunit.javascript.host.svg.SVGEllipseElement;
451452
import org.htmlunit.javascript.host.svg.SVGFEBlendElement;
@@ -674,7 +675,8 @@ public final class JavaScriptConfiguration extends AbstractJavaScriptConfigurati
674675
SVGDefsElement.class, SVGDescElement.class, SVGElement.class,
675676
SVGEllipseElement.class, SVGFEBlendElement.class, SVGFEColorMatrixElement.class,
676677
SVGFEComponentTransferElement.class, SVGFECompositeElement.class, SVGFEConvolveMatrixElement.class,
677-
SVGFEDiffuseLightingElement.class, SVGFEDisplacementMapElement.class, SVGFEDistantLightElement.class,
678+
SVGFEDiffuseLightingElement.class, SVGDiscardElement.class,
679+
SVGFEDisplacementMapElement.class, SVGFEDistantLightElement.class,
678680
SVGFEDropShadowElement.class,
679681
SVGFEFloodElement.class, SVGFEFuncAElement.class, SVGFEFuncBElement.class, SVGFEFuncGElement.class,
680682
SVGFEFuncRElement.class, SVGFEGaussianBlurElement.class, SVGFEImageElement.class, SVGFEMergeElement.class,
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2002-2025 Gargoyle Software Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* https://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
package org.htmlunit.javascript.host.svg;
16+
17+
import static org.htmlunit.javascript.configuration.SupportedBrowser.FF;
18+
19+
import org.htmlunit.javascript.configuration.JsxClass;
20+
import org.htmlunit.javascript.configuration.JsxConstructor;
21+
22+
/**
23+
* A JavaScript object for {@code SVGDiscardElement}.
24+
*
25+
* @author Ronald Brill
26+
*/
27+
@JsxClass(FF)
28+
public class SVGDiscardElement extends SVGAnimationElement {
29+
30+
/**
31+
* Creates an instance.
32+
*/
33+
@Override
34+
@JsxConstructor
35+
public void jsConstructor() {
36+
super.jsConstructor();
37+
}
38+
}

src/test/java/org/htmlunit/general/HostClassNameTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7657,7 +7657,8 @@ public void svgDescElement() throws Exception {
76577657
* @throws Exception if the test fails
76587658
*/
76597659
@Test
7660-
@Alerts("ReferenceError")
7660+
@Alerts(DEFAULT = "ReferenceError",
7661+
FF = "function SVGDiscardElement() { [native code] }")
76617662
public void svgDiscardElement() throws Exception {
76627663
test("SVGDiscardElement");
76637664
}

src/test/java/org/htmlunit/general/HostTypeOfTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7637,7 +7637,8 @@ public void svgDescElement() throws Exception {
76377637
* @throws Exception if the test fails
76387638
*/
76397639
@Test
7640-
@Alerts("undefined")
7640+
@Alerts(DEFAULT = "undefined",
7641+
FF = "function")
76417642
public void svgDiscardElement() throws Exception {
76427643
test("SVGDiscardElement");
76437644
}

src/test/java/org/htmlunit/general/huge/HostParentOfDTest.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,18 @@ public void _Element_SVGDescElement() throws Exception {
12901290
test("Element", "SVGDescElement");
12911291
}
12921292

1293+
/**
1294+
* @throws Exception if the test fails
1295+
*/
1296+
@Test
1297+
@Alerts(DEFAULT = "true",
1298+
CHROME = "false",
1299+
EDGE = "false",
1300+
FF_ESR = "false")
1301+
public void _Element_SVGDiscardElement() throws Exception {
1302+
test("Element", "SVGDiscardElement");
1303+
}
1304+
12931305
/**
12941306
* @throws Exception if the test fails
12951307
*/
@@ -4091,6 +4103,18 @@ public void _EventTarget_SVGDescElement() throws Exception {
40914103
test("EventTarget", "SVGDescElement");
40924104
}
40934105

4106+
/**
4107+
* @throws Exception if the test fails
4108+
*/
4109+
@Test
4110+
@Alerts(DEFAULT = "true",
4111+
CHROME = "false",
4112+
EDGE = "false",
4113+
FF_ESR = "false")
4114+
public void _EventTarget_SVGDiscardElement() throws Exception {
4115+
test("EventTarget", "SVGDiscardElement");
4116+
}
4117+
40944118
/**
40954119
* @throws Exception if the test fails
40964120
*/

src/test/java/org/htmlunit/general/huge/HostParentOfNTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,19 @@ public void _Node_SVGDescElement() throws Exception {
11601160
test("Node", "SVGDescElement");
11611161
}
11621162

1163+
/**
1164+
* @throws Exception
1165+
* if the test fails
1166+
*/
1167+
@Test
1168+
@Alerts(DEFAULT = "true",
1169+
CHROME = "false",
1170+
EDGE = "false",
1171+
FF_ESR = "false")
1172+
public void _Node_SVGDiscardElement() throws Exception {
1173+
test("Node", "SVGDiscardElement");
1174+
}
1175+
11631176
/**
11641177
* @throws Exception
11651178
* if the test fails

0 commit comments

Comments
 (0)