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

Implemented the NodeIterator interface for WorkerDOM #1187

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

knownotunknown
Copy link

@knownotunknown knownotunknown commented Jan 22, 2024

I implemented the NodeIterator interface for WorkerDOM.

This opens up the possibility for computationally expensive DOM traversal algorithms to be ran in a web worker to avoid any unresponsive user experiences.

Example use-case: Mark.js is a fully-featured highlighter that works by finding target texts within DOM elements, splitting those DOM elements, and applying a highlighter class for the new target text DOM element.

In the worst-case, it can crash the tab. This would prevent that (although it would double the actual time to complete which also isn't a great real-world solution).

Nonetheless, the possibilities of being able to run complex DOM traversal algorithms seems interesting.

@CLAassistant
Copy link

CLAassistant commented Jan 22, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants