Title: Error when initializing Child Workers · Issue #99 · developit/workerize-loader · GitHub
Open Graph Title: Error when initializing Child Workers · Issue #99 · developit/workerize-loader
X Title: Error when initializing Child Workers · Issue #99 · developit/workerize-loader
Description: I tried initializing child web workers from a parent worker, and it seems to work well with the exception of the following error being thrown: rpc-wrapper.js:20 Uncaught ReferenceError: document is not defined at Worker.
Open Graph Description: I tried initializing child web workers from a parent worker, and it seems to work well with the exception of the following error being thrown: rpc-wrapper.js:20 Uncaught ReferenceError: document is...
X Description: I tried initializing child web workers from a parent worker, and it seems to work well with the exception of the following error being thrown: rpc-wrapper.js:20 Uncaught ReferenceError: document is...
Opengraph URL: https://github.com/developit/workerize-loader/issues/99
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error when initializing Child Workers","articleBody":"I tried initializing child web workers from a parent worker, and it seems to work well with the exception of the following error being thrown:\r\n\r\n```\r\nrpc-wrapper.js:20 Uncaught ReferenceError: document is not defined\r\n at Worker.\u003canonymous\u003e (rpc-wrapper.js:20)\r\n```\r\n\r\nDigging in, it seems like its part of building up the `ready` event, although document is not in scope in the context of a WebWorker.\r\n\r\n```\r\nlet evt = document.createEvent('Event');\r\nevt.initEvent(d.method, false, false);\r\nevt.data = d.params;\r\nworker.dispatchEvent(evt);\r\n```\r\n\r\nWhat is the purpose of the `ready` event? Is there a way to build the event in a WebWorker-safe manner? I've looked into `new Event`, but that's not IE compatible.","author":{"url":"https://github.com/kevinfmoody","@type":"Person","name":"kevinfmoody"},"datePublished":"2020-06-18T00:47:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/99/workerize-loader/issues/99"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:79a7c81a-6382-4a93-4534-64bdcba314ba |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ADF6:1B11A3:526896:7453D5:6978A6AC |
| html-safe-nonce | 24c65b0e596297a74f82e2d8272a8f6873215fe2f34923cd11f251465a851d7f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREY2OjFCMTFBMzo1MjY4OTY6NzQ1M0Q1OjY5NzhBNkFDIiwidmlzaXRvcl9pZCI6Ijc2NTExMzc0MTIzOTQ0MjgwNzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 016e34bb7bda6d789c1d2b563c960e971bf4c7af917e0c18479155a1636cdf45 |
| hovercard-subject-tag | issue:640827163 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developit/workerize-loader/99/issue_layout |
| twitter:image | https://opengraph.githubassets.com/74940b0f7670c91764b120a18faac35914f4e65404386f0193e5005267af404b/developit/workerize-loader/issues/99 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/74940b0f7670c91764b120a18faac35914f4e65404386f0193e5005267af404b/developit/workerize-loader/issues/99 |
| og:image:alt | I tried initializing child web workers from a parent worker, and it seems to work well with the exception of the following error being thrown: rpc-wrapper.js:20 Uncaught ReferenceError: document is... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kevinfmoody |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2981c597c945c1d90ac6fa355ce7929b2f413dfe7872ca5c435ee53a24a1de50 |
| turbo-cache-control | no-preview |
| go-import | github.com/developit/workerize-loader git https://github.com/developit/workerize-loader.git |
| octolytics-dimension-user_id | 105127 |
| octolytics-dimension-user_login | developit |
| octolytics-dimension-repository_id | 116874897 |
| octolytics-dimension-repository_nwo | developit/workerize-loader |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 116874897 |
| octolytics-dimension-repository_network_root_nwo | developit/workerize-loader |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f8aa86d87c47054170094daaf9699b27a28a8448 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width