alert() not working in codepen, consider alternative onclick functions for tutorial
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 11.8k
- Forks
- 7.9k
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
https://github.com/reactjs/reactjs.org/blob/master/content/tutorial/tutorial.md
At some part of this tutorial (um, line 238 of that md file), I was asked to give the squares an onclick function of alert("click"). However, apparently Chrome has blocked this from running in codepen (A different origin subframe tried to create a JavaScript dialog. This is no longer allowed and was blocked. See https://www.chromestatus.com/feature/5148698084376576 for more details.), and can be confusing to people.
The next best alternative for alert that I can think of is console.log, and logged messages can be seen in both the browser's console and codepen's console.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Öffne tutorial/tutorial.md ungefähr bei Zeile 238 und überprüfe den alert("click")-Handler der Quadrate im CodePen-Beispiel. Verifiziere, dass eine Alternative wie console.log sowohl in der Browserkonsole als auch in den CodePen-Konsolen funktioniert; die Arbeit ist abgeschlossen, wenn das Beispiel nicht mehr den blockierten Dialog auslöst und verständlich bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 38/100