Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLSearchParams is missing "size" property #1396

Open
shadow-identity opened this issue Apr 8, 2024 · 0 comments
Open

URLSearchParams is missing "size" property #1396

shadow-identity opened this issue Apr 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@shadow-identity
Copy link

Describe the bug
URLSearchParams should have its size property which indicates the total number of search parameter entries. However, happy-dom implementation always returns undefined when trying to access it.

To Reproduce
Steps to reproduce the behavior:

  1. In node environment, for example in vitest, add this code:
    const searchParams = new URLSearchParams()
    console.log(searchParams.size)
    searchParams.append('foo', 'bar')
    console.log(searchParams.size)
  2. Run and check the console output

Expected behavior
Console should return

0
1

But it returns

undefined
undefined

Device:

  • OS: 14.4.1 (23E224)
  • Node
  • v18.14.0
@shadow-identity shadow-identity added the bug Something isn't working label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant