Skip to content

Fetch linked resource. #88

Answered by jg10-mastodon-social
thhck asked this question in Q&A
Discussion options

You must be logged in to vote

Based on my experience, I would offer two possible solutions:

Live page at https://jg10.solidcommunity.net/public/2025-04-11.html

Option 1:

If you're writing this as a custom component, then you are anyway using JavaScript, so it would make sense to use PodOS core functions (or rdflib.js functions, where necessary).

  1. Receive a resource object from pos-resource by emitting the event pod-os:resource with a callback,
  2. access the predicate using the rdflib.js methods (because PodOS core doesn't offer convenience functions for this yet)

I would also use the PodOS core function for label, picture and description in this case because it'll reduce the dom overhead.

      class EmailLink extends H…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by angelo-v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants