-
Notifications
You must be signed in to change notification settings - Fork 583
Open
Description
Description:
The project uses XMLHttpRequest for data fetching. This is an older, more verbose API that makes error handling and asynchronous logic complex.
Current Code (content.js):
Improved Code:
async function getProducts() {
try {
const response = await fetch("https://5d76bf96515d1a0014085cf9.mockapi.io/product");
const data = await response.json();
// ... rendering logic
} catch (error) {
console.error("Failed to fetch products:", error);
}
}
Metadata
Metadata
Assignees
Labels
No labels