{"id":20463851,"url":"https://github.com/lorddashme/learning-js-web-workers","last_synced_at":"2026-06-01T04:31:51.850Z","repository":{"id":72015420,"uuid":"202650874","full_name":"LordDashMe/learning-js-web-workers","owner":"LordDashMe","description":"A simple example to test the Web Workers separation to the main browser window thread.","archived":false,"fork":false,"pushed_at":"2020-01-06T01:58:08.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T12:18:08.364Z","etag":null,"topics":["javascript","js","mozilla","web-workers","webworker-demo","workers"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LordDashMe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-16T03:19:55.000Z","updated_at":"2020-01-06T01:58:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"85e3314f-e52b-47b1-b695-568bd05eebd3","html_url":"https://github.com/LordDashMe/learning-js-web-workers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LordDashMe/learning-js-web-workers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordDashMe%2Flearning-js-web-workers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordDashMe%2Flearning-js-web-workers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordDashMe%2Flearning-js-web-workers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordDashMe%2Flearning-js-web-workers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LordDashMe","download_url":"https://codeload.github.com/LordDashMe/learning-js-web-workers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordDashMe%2Flearning-js-web-workers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33760645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","js","mozilla","web-workers","webworker-demo","workers"],"created_at":"2024-11-15T13:13:17.825Z","updated_at":"2026-06-01T04:31:51.826Z","avatar_url":"https://github.com/LordDashMe.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning JS Web Workers\n\nA simple example to test the Web Workers separation to the main browser window thread.\n\n## Usage\n\n- The JS Web Workers requires to run with a domain or in a http-server, thus this will not work in a ```file://```.\n\n- Open the ```index.html``` file in your preferred browser and you can now check how JS Web Workers separated from the main thread by click the buttons.\n\n- You might wonder why the UI doesn't change and the worker seems like blocked by the main thread when you start the block thread and prompting an ```alert()```.\n\n- I added a ```console.log()``` inside the ```worker.js```, this can be use to verify the process of the worker is actually done in the background and not blocked by the main thread.\n\n- To check this you need to open your browser developer console tab.\n\n### Restriction\n\n- Web Workers can't access DOM elements from the web page.\n\n- Web Workers can't access global variables and JavaScript functions from the web page.\n\n- Web Workers can't call alert() or confirm() functions.\n\n- Objects such as window, document and parent can't be accessed inside the web worker.\n\n## Reference\n\n- [Developer Mozilla](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florddashme%2Flearning-js-web-workers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florddashme%2Flearning-js-web-workers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florddashme%2Flearning-js-web-workers/lists"}