geneontology / wc-gocam-viz

Web component to visualize GO-CAMs
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Allow GO-CAM data to be provided to widget #29

Closed pkalita-lbl closed 8 months ago

pkalita-lbl commented 8 months ago

Fixes #19

These changes:

The combination of the first two items allows host pages that already have the GO-CAM data available to simple reuse that instead of making a redundant network request. This will be useful for AmiGO in particular. The new demo/dev page src/local-data.html shows an example of how it works.

The linked issue also talks about the possibility of asking the widget for data that it automatically fetched. But the more I thought about it, the less I saw a clear use case for that. With these changes the rule is clear: if the host page wants the data, it should get the data itself and pass the response to the widget in addition to anything else it want to do with the response.