|
|
|
|
|
by kybernetikos
2994 days ago
|
|
I agree, and looking at their site, they don't seem to have taken steps to avoid this problem. I wonder if we could have a standard api, like window.requestAPI('ipfs' or 'eth' or whatever) returns a Promise, and the user gets a 'page is requesting' bar like we do with location requests. That way, you wouldn't be leaking information about your browser capabilities to pages that you don't wish to use those capabilities on. |
|
So as a application developer, you would check if window.ipfs exists on the page, and if it doesn't, load js-ipfs and then the rest of the page can function the same way, no matter how ipfs was loaded on the page.
Unless we can be sure that when browsers implement IPFS, window.requestAPI('ipfs') would be the API, going the route we're taking now is the safest bet, unfortunately.
(Disclaimer: I work on IPFS)