MCPcopy Create free account
hub / github.com/SuperSimpleDev/javascript-course / loadCart

Function loadCart

2-copy-of-code/lesson-18/data/cart.js:75–85  ·  view source on GitHub ↗
(fun)

Source from the content-addressed store, hash-verified

73}
74
75export function loadCart(fun) {
76 const xhr = new XMLHttpRequest();
77
78 xhr.addEventListener('load', () => {
79 console.log(xhr.response);
80 fun();
81 });
82
83 xhr.open('GET', 'https://supersimplebackend.dev/cart');
84 xhr.send();
85}

Callers 1

loadPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected