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

postMessage api does not use macroTask timing. #948

Closed
DylanPiercey opened this issue Jun 7, 2023 · 1 comment · Fixed by #947
Closed

postMessage api does not use macroTask timing. #948

DylanPiercey opened this issue Jun 7, 2023 · 1 comment · Fixed by #947
Labels
bug Something isn't working

Comments

@DylanPiercey
Copy link
Contributor

Describe the bug
The window.postMessage api uses "macro task" timing which some tools/libraries rely on to provide a shim of the setImmediate api in node js.

Currently the postMessage api implemented by HappyDOM is sync which can cause unexpected behavior.

To Reproduce
Call the postMessage api and the message event is fired synchronously.

Expected behavior
Call the postMessage api and the message event is fired asynchronously.

@DylanPiercey DylanPiercey added the bug Something isn't working label Jun 7, 2023
DylanPiercey added a commit to DylanPiercey/happy-dom that referenced this issue Jun 7, 2023
DylanPiercey added a commit to DylanPiercey/happy-dom that referenced this issue Jun 8, 2023
DylanPiercey added a commit to DylanPiercey/happy-dom that referenced this issue Jun 8, 2023
capricorn86 added a commit to DylanPiercey/happy-dom that referenced this issue Jul 10, 2023
…Fixes problem in HTMLIframeElement where it did'nt load a page when setting URL by attributeafter it has been connected to DOM.
capricorn86 added a commit to DylanPiercey/happy-dom that referenced this issue Jul 10, 2023
…Fixes problem in HTMLIframeElement where it did'nt load a page when setting URL by attributeafter it has been connected to DOM.
capricorn86 added a commit to DylanPiercey/happy-dom that referenced this issue Jul 10, 2023
…Fixes problem in HTMLIframeElement where it did'nt load a page when setting URL by attributeafter it has been connected to DOM.
capricorn86 added a commit to DylanPiercey/happy-dom that referenced this issue Jul 10, 2023
…Fixes problem in HTMLIframeElement where it did'nt load a page when setting URL by attributeafter it has been connected to DOM.
capricorn86 added a commit to DylanPiercey/happy-dom that referenced this issue Jul 10, 2023
…Fixes problem in HTMLIframeElement where it did'nt load a page when setting URL by attributeafter it has been connected to DOM.
capricorn86 added a commit that referenced this issue Jul 10, 2023
#948@patch: Use macro task timing for postmessage api.
@capricorn86
Copy link
Owner

Your fix has been released.

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

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

Successfully merging a pull request may close this issue.

2 participants