File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
main/java/org/htmlunit/javascript/host/css Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 88
99 <body>
1010 <release version="4.10.0" date="February xx, 2025" description="Bugfixes">
11+ <action type="fix" dev="rbri">
12+ CSSGroupingRule several fixes to throw the correct error.
13+ </action>
1114 <action type="fix" dev="rbri">
1215 HTMLInputElement value/selectionStart/selectionEnd properties throws the correct error (InvalidStateError).
1316 </action>
Original file line number Diff line number Diff line change @@ -114,10 +114,14 @@ else if (JavaScriptEngine.isUndefined(position)) {
114114 return positionInt ;
115115 }
116116 catch (final DOMException ex ) {
117- throw JavaScriptEngine .throwAsScriptRuntimeEx (ex );
117+ throw JavaScriptEngine .asJavaScriptException (
118+ getWindow (),
119+ new org .htmlunit .javascript .host .dom .DOMException (
120+ ex .getMessage (),
121+ ex .code ));
118122 }
119123 }
120- throw JavaScriptEngine .throwAsScriptRuntimeEx ( e );
124+ throw JavaScriptEngine .syntaxError ( e . getMessage () );
121125 }
122126 }
123127
@@ -133,7 +137,11 @@ public void deleteRule(final int position) {
133137 refreshCssRules ();
134138 }
135139 catch (final DOMException e ) {
136- throw JavaScriptEngine .throwAsScriptRuntimeEx (e );
140+ throw JavaScriptEngine .asJavaScriptException (
141+ getWindow (),
142+ new org .htmlunit .javascript .host .dom .DOMException (
143+ e .getMessage (),
144+ e .code ));
137145 }
138146 }
139147
You can’t perform that action at this time.
0 commit comments