{"id":19346550,"url":"https://github.com/canjs/worker-render","last_synced_at":"2025-04-23T05:30:39.130Z","repository":{"id":33992153,"uuid":"37745159","full_name":"canjs/worker-render","owner":"canjs","description":"Run your single-page application in a web worker","archived":false,"fork":false,"pushed_at":"2020-05-04T22:53:58.000Z","size":647,"stargazers_count":14,"open_issues_count":10,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-14T23:20:17.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://canjs.github.io/worker-render","language":"JavaScript","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/canjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-19T20:49:15.000Z","updated_at":"2022-08-04T06:46:15.000Z","dependencies_parsed_at":"2022-07-13T22:42:59.764Z","dependency_job_id":null,"html_url":"https://github.com/canjs/worker-render","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fworker-render","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fworker-render/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fworker-render/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/canjs%2Fworker-render/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/canjs","download_url":"https://codeload.github.com/canjs/worker-render/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223909968,"owners_count":17223592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-10T04:10:49.759Z","updated_at":"2024-11-10T04:10:50.280Z","avatar_url":"https://github.com/canjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n@page worker-render\n@group worker-render.modules Modules\n--\u003e\n\n# worker-render\n\n[![npm version](https://badge.fury.io/js/worker-render.svg)](http://badge.fury.io/js/worker-render)\n\nRun your applications in a WebWorker and have changes automatically update the DOM.\n\n## Install\n\n```shell\nnpm install worker-render --save\n```\n\n## Usage\n\nTo use worker-render you need a module that runs in the window and one that runs in a Web Worker.\nGetting your app to run in a Web Worker is up to you, but it is easy with [StealJS](http://stealjs.com/).\n\n### window.js\n\n```js\nvar windowRender = require(\"worker-render/window\");\n\nvar worker = new Worker(...);\nwindowRender.updateWith(worker);\n```\n\n### worker.js\n\n**worker-render** will work with any JavaScript framework. In this example `todoApp` is a\nfunction that returns a DocumentFragment. How you initialize your application is up\nto you, but you should do so in the `ready` callback.\n\n```js\nvar renderer = require(\"worker-render/worker\");\nvar $ = require(\"jquery\");\nvar todoApp = require(\"./todo-app\");\n\nrenderer.ready(render);\n\nfunction render(){\n  $(\"#app\").html(todoApp());\n}\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fworker-render","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanjs%2Fworker-render","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanjs%2Fworker-render/lists"}