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

setTimeout / setInterval does not pass arguments to callback #712

Closed
CSchulz opened this issue Feb 3, 2023 · 1 comment · Fixed by #713
Closed

setTimeout / setInterval does not pass arguments to callback #712

CSchulz opened this issue Feb 3, 2023 · 1 comment · Fixed by #713
Labels
bug Something isn't working

Comments

@CSchulz
Copy link
Contributor

CSchulz commented Feb 3, 2023

Describe the bug
Arguments to callback function of setTimeout or setInterval doesn't receivce arguments.

To Reproduce
Execute in browser:

const callback = (message) => {console.log(message)};
setTimeout(callback, 0, 'hello');

VM154:1 hello

Execute in happy-dom:

const callback = (message) => {console.log(message)};
setTimeout(callback, 0, 'hello');

VM154:1 undefined

Expected behavior
Should print hello as the browser.

Screenshots
If applicable, add screenshots to help explain your problem.

Device:

  • Version 8.2.3
@CSchulz CSchulz added the bug Something isn't working label Feb 3, 2023
CSchulz added a commit to CSchulz/happy-dom that referenced this issue Feb 3, 2023
CSchulz added a commit to CSchulz/happy-dom that referenced this issue Feb 3, 2023
CSchulz added a commit to CSchulz/happy-dom that referenced this issue Feb 3, 2023
CSchulz added a commit to CSchulz/happy-dom that referenced this issue Feb 3, 2023
CSchulz added a commit to CSchulz/happy-dom that referenced this issue Feb 3, 2023
capricorn86 added a commit that referenced this issue Feb 3, 2023
#712@patch: fix handling of callback arguments passing given to setTimeout / setInterval
@capricorn86
Copy link
Owner

Thanks for your contribution @CSchulz! 🙂

Your fix has been released.

You can read more about the release here:
https://github.com/capricorn86/happy-dom/releases/tag/v8.2.5

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
2 participants