(fun)
| 73 | } |
| 74 | |
| 75 | export 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 | } |