Title: Support bundling of JS snippets · Issue #508 · swiftwasm/JavaScriptKit · GitHub
Open Graph Title: Support bundling of JS snippets · Issue #508 · swiftwasm/JavaScriptKit
X Title: Support bundling of JS snippets · Issue #508 · swiftwasm/JavaScriptKit
Description: as mentioned in #477 we currently have no good solution for creating a library that contains both Swift and JS code. even if we can automatically "import" JS globals via BridgeJS, certain cases will require JS code, eg when: you need JS ...
Open Graph Description: as mentioned in #477 we currently have no good solution for creating a library that contains both Swift and JS code. even if we can automatically "import" JS globals via BridgeJS, certain cases wil...
X Description: as mentioned in #477 we currently have no good solution for creating a library that contains both Swift and JS code. even if we can automatically "import" JS globals via BridgeJS, certain...
Opengraph URL: https://github.com/swiftwasm/JavaScriptKit/issues/508
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support bundling of JS snippets","articleBody":"as mentioned in #477 we currently have no good solution for creating a library that contains both Swift and JS code.\n\neven if we can automatically \"import\" JS globals via BridgeJS, certain cases will require JS code, eg when:\n+ you need JS features that are not exposed through the bridge (eg: create a class)\n+ the back and forth through the bridging layer adds unnecessary runtime work for a \"chunk of JS work\"\n\nhere is a use case from ElementaryUI:\nI want to create Swift API that let's you define custom elements (\"web components\").\nit is currently incubated in the elementary.codes repo ([ts code](https://github.com/elementary-swift/elementary.codes/blob/48e12277aadfafa855ffccfb0f1c8437b9ab5c17/elementary-components.ts), [swift code](https://github.com/elementary-swift/elementary.codes/blob/48e12277aadfafa855ffccfb0f1c8437b9ab5c17/swift/Sources/Snippets/_Components.swift))\n\nideally we can just develop a Swift package with JS functions and Swift functions, add and attribute, and it will all \"just work\" in the final app that uses this library.","author":{"url":"https://github.com/sliemeobn","@type":"Person","name":"sliemeobn"},"datePublished":"2026-01-22T08:28:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/508/JavaScriptKit/issues/508"}
| 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:194c2e65-fb14-191d-69a1-d34a89c63b51 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B8F0:DA408:429808:56AAF2:6980381B |
| html-safe-nonce | 149afed3e862f53d862e699290cfb9ed5dc2212c1c73c25922a7d7cb36338f93 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEYwOkRBNDA4OjQyOTgwODo1NkFBRjI6Njk4MDM4MUIiLCJ2aXNpdG9yX2lkIjoiODE2MzU3NDYyMzU2NTM5NDE5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cacb9ed303c4ab5dad824d604ea410764b0712de4f72f1f5f6354d6232fc5b9a |
| hovercard-subject-tag | issue:3841821998 |
| 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/swiftwasm/JavaScriptKit/508/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f2ebe579eb164b27382f1e929015bb389d967249b58c87f066bba8a4e3f36029/swiftwasm/JavaScriptKit/issues/508 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f2ebe579eb164b27382f1e929015bb389d967249b58c87f066bba8a4e3f36029/swiftwasm/JavaScriptKit/issues/508 |
| og:image:alt | as mentioned in #477 we currently have no good solution for creating a library that contains both Swift and JS code. even if we can automatically "import" JS globals via BridgeJS, certain cases wil... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sliemeobn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/swiftwasm/JavaScriptKit git https://github.com/swiftwasm/JavaScriptKit.git |
| octolytics-dimension-user_id | 49500752 |
| octolytics-dimension-user_login | swiftwasm |
| octolytics-dimension-repository_id | 244832006 |
| octolytics-dimension-repository_nwo | swiftwasm/JavaScriptKit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 244832006 |
| octolytics-dimension-repository_network_root_nwo | swiftwasm/JavaScriptKit |
| 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 | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width