Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Fix URL.searchParams cannot find function#375

Merged
rbri merged 5 commits intoHtmlUnit:masterHtmlUnit/htmlunit:masterfrom
cdalexndr:url_search_params_fixcdalexndr/htmlunit:url_search_params_fixCopy head branch name to clipboard
Aug 31, 2021
Merged

Fix URL.searchParams cannot find function#375
rbri merged 5 commits intoHtmlUnit:masterHtmlUnit/htmlunit:masterfrom
cdalexndr:url_search_params_fixcdalexndr/htmlunit:url_search_params_fixCopy head branch name to clipboard

Conversation

@cdalexndr
Copy link
Contributor

Fix the following javascript error:
new URL('http://test.com/path?a=b).searchParams.set('a',b')

com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function set in object a=b.
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:949)
	at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:598)
	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:487)
	at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:353)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:829)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:805)
	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:796)
	at net.sourceforge.htmlunit.corejs.javascript.ScriptableObject.<init>(ScriptableObject.java:390)
	at com.gargoylesoftware.htmlunit.javascript.HtmlUnitScriptable.<init>(HtmlUnitScriptable.java:35)
	at com.gargoylesoftware.htmlunit.javascript.SimpleScriptable.<init>(SimpleScriptable.java:52)
	at com.gargoylesoftware.htmlunit.javascript.host.URLSearchParams.<init>(URLSearchParams.java:123)
	at com.gargoylesoftware.htmlunit.javascript.host.URL.getSearchParams(URL.java:227)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)

@rbri rbri merged commit 63c4096 into HtmlUnit:master Aug 31, 2021
@rbri
Copy link
Member

rbri commented Aug 31, 2021

As always many thanks fr the contribution. Will have a look at the others during the next days.

Btw: it will be really great if we can use your real name for the author tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.