Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Loading data with fetch

Public visualization

Viewing a saved revision (read-only)

de07256b2d34418db7fcba9e82c4cd4f

Loading data with fetch

0 stars1🌍 Public
RRuanzhenglin
Last edited Apr 10, 2021
Created on Apr 10, 2021
Forked from HTML Starter

This example demonstrates how to load external data into a web page using the built-in Fetch API. It defines an asynchronous function, `fetchText`, that retrieves a CSV file containing named CSS colors from a GitHub Gist URL. The fetched text is then logged to the browser console. The code uses vanilla JavaScript within an HTML file, showcasing the `fetch` and `response.text()` methods without any additional libraries or frameworks.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.