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

TreeWalker traversal does not advance in web worker #254

Closed
1 task done
MasonPinZ opened this issue Sep 12, 2022 · 2 comments
Closed
1 task done

TreeWalker traversal does not advance in web worker #254

MasonPinZ opened this issue Sep 12, 2022 · 2 comments
Labels

Comments

@MasonPinZ
Copy link
Contributor

MasonPinZ commented Sep 12, 2022

  • I am interested in helping provide a fix!

Describe the bug
When executed in Partytown web worker, DOM node traversal using TreeWalker never advances and falls into infinite loops.

To Reproduce
Steps to reproduce the behavior:

  1. In a script block of type text/partytown, get a TreeWalker instance by calling document.createTreeWalker()
  2. Traverse DOM nodes using the TreeWalker instance by:
    const treeWalker = document.createTreeWalker(document.body, 1);
    do {
      // some code like:
      console.log(treeWalker.currentNode.nodeName);
    } while (treeWalker.nextNode());
  3. Observation: the loop above never ends and treeWalker.currentNode is always the initial DOM node.

Reproduction link
A test case has been created in this PR. To run the test case:

npx playwright test tests/platform/tree-walker --browser=chromium

Expected behavior
The DOM tree traversal should advance and complete normally as being executed on main thread.

Partytown version
0.6.4

Screenshots
N/A.

Additional context
None.

@linuxd3v
Copy link

interesting - I think this is caused by the same issue as iterable bug I'm seeing:#257
any idea what causing this?

Copy link
Contributor

Partytown moves to QwikDev organization, this is a new beginning for the project. So it's time to clarify the status and clean up the current state a bit. This issue was automatically marked as deprecated and closed because it was not detected recent activity for 8 months, date of latest version. If this issue is still relevant, feel free to comment below and the maintainers will reopen it. Thank you for your contributions.

@github-actions github-actions bot added the stale label Nov 24, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants