Skip to content

Support bundling of JS snippets #508

@sliemeobn

Description

@sliemeobn

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 features that are not exposed through the bridge (eg: create a class)
  • the back and forth through the bridging layer adds unnecessary runtime work for a "chunk of JS work"

here is a use case from ElementaryUI:
I want to create Swift API that let's you define custom elements ("web components").
it is currently incubated in the elementary.codes repo (ts code, swift code)

ideally 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions