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

Allow apps to extend the functionality of the extension #1

Open
megoth opened this issue Sep 28, 2023 · 0 comments
Open

Allow apps to extend the functionality of the extension #1

megoth opened this issue Sep 28, 2023 · 0 comments

Comments

@megoth
Copy link
Owner

megoth commented Sep 28, 2023

Noel De Martin makes an excellent point about allowing apps to make use of the context that is the resource the user is watching, e.g. to show recipe-related functions for webpages about recipes.

I want to consider a way to do this in a secure manner. Given that an app can do a lot in the context of the extension, I think an extra step reminding the user that allowing this feature requires a massive trust in the developer of the app, and possibly allow them to turn off that part of the app's features.

Initial idea for an API is that the app provides a URL for a JS module. It has a default function that provides a request, response API similar to many web APIs.

Example manifest.ttl:

@prefix app: <#> .
@prefix manifest: <https://github.com/megoth/ldo-solid-app-manifest/ontology.ttl#> .
@prefix todo: <https://todo-ldo-megoth.vercel.app/ontology.ttl#> .

</>
    a manifest:Document ;
    manifest:list app:solid-app .

app:solid-app
    a manifest:Manifest ;
    // ...
    manifest:module "https://todo-ldo-megoth.vercel.app/solid-app.js"

Example solid-app.js

default function App(req, res) {
  // do something with req or res
}
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