microsoft / hermes-windows

Hermes is a small and lightweight JavaScript engine optimized for running React Native apps..
https://hermesengine.dev
MIT License
52 stars 33 forks source link

URLSearchParams missing functionality #186

Open mbest opened 4 months ago

mbest commented 4 months ago

Bug Description

I'm trying to use the URLSearchParams API to parse a query string.

However, the only functionality that seems to work is passing an object to the URLSearchParams constructor and it's toString method.

Other operations such as passing a query string into the constructor, returns an empty _searchParams object. Furthermore, other parts of the API like the get and has methods throw a not implemented error.

Is the full API not available here?


Hermes git revision (if applicable):

React Native version:

OS:

Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):

Steps To Reproduce

const paramStr = "foo=bar&foo=baz";
const searchParams = new URLSearchParams(paramStr);

console.log(searchParams.get("foo")); //should return first value "bar", throws not implemented error.