Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: allow runApp() to accept object with engine #65

Open
wch opened this issue Sep 13, 2023 · 0 comments
Open

Proposal: allow runApp() to accept object with engine #65

wch opened this issue Sep 13, 2023 · 0 comments

Comments

@wch
Copy link
Collaborator

wch commented Sep 13, 2023

Currently, when you call runApp() and pass in some files, you do this:

runApp(el, "viewer", { startFiles: files }, "r")

Where files has type Array<FileContent>.

But I think it makes as much sense for the object that's passed to runApp to contain information about which engine to use. Instead of just an array of files, it would also provide info about how to run the app. So the structure would be something like:

type AppSpec = {
  engine: AppEngine,
  files: Array<FileContent>
}

// This could be loaded from JSON
const app = { engine: "r", files = [ ... ] };

runApp(el, "viewer", { appSpec: app })

Unlike some of the other options engine seems inherent to the app; viewerHeight, for example, seems incidental to the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant