fetch()
The platform’s fetch and Response, sent from the cloud or the user’s browser, see fetch().
@fkn/lib lets a web app open sockets, fetch a URL the browser cannot, keep files that follow the user’s account, and embed a real website and act on it. This page routes you by goal first, then by surface.
Each link takes one goal to a working result:
| Reach the network | Use the browser the user has | Store, extend, ship |
|---|---|---|
| Call an API that sends no CORS headers | Embed a real site and act on it | Save files that follow the account |
| Open a TCP or UDP socket | Use the user’s own session | Back app state up to the account |
| Run sockets in a worker | Ask for consent well | Add a package to your app |
A guide explains one surface completely, and a recipe composes several calls into one job.
The demo below loads the real en.wikipedia.org inside a frame and restyles it. Run the demo reads the heading, types a search and presses the search button. With the FKN extension on the page, one consent sheet, the prompt it shows before your app reads or acts on a site, covers all three. Without it the same three run through the FKN cloud with nothing installed:
Open in new tab runs it on a page of its own.
One card per surface, each linking to its guide:
fetch()
The platform’s fetch and Response, sent from the cloud or the user’s browser, see fetch().
Sockets
Node’s net and dgram, carried over the relay that holds the real socket, see TCP and UDP sockets.
Storage
A subset of Node’s fs in three file systems that differ in where the bytes live, see storage.
Frames
attachFrame() puts another website inside your page and hands back a Frame you drive, see frames.
Locators
A locator chain, a Locator built by chaining selectors, reads and acts on the site inside an attached frame, see locators and actions.
Permissions
The consent sheet, the reason you give with a call, and the activity log, the on-device record of what an app did, see permissions and consent.
Account
connect(), what an app may read of the account, the FKN identity a person carries between sites, and the metered volume behind cloud.quota(), see account and quota.
Packages
An npm module on a sandbox origin of its own, installed and shown from your app, see packages.