This commit is contained in:
Ilya Kantor 2019-03-20 15:56:08 +03:00
parent 3fea520546
commit 2bcbbfcae0

View file

@ -71,7 +71,7 @@ function gotWeather({ temperature, humidity }) {
// 2. Pass its name as the ?callback parameter for the script // 2. Pass its name as the ?callback parameter for the script
let script = document.createElement('script'); let script = document.createElement('script');
script.src = `http://cors.javascript.local/article/fetch-crossorigin/demo/script?callback=gotWeather`; script.src = `https://cors.javascript.info/article/fetch-crossorigin/demo/script?callback=gotWeather`;
document.body.append(script); document.body.append(script);
// 3. The expected answer from the server looks like this: // 3. The expected answer from the server looks like this: