Skip to content

Commit 6ba4f3b

Browse files
authored
Fix content issues (#41351)
1 parent 8e24c99 commit 6ba4f3b

File tree

49 files changed

+187
-181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+187
-181
lines changed

.vscode/dictionaries/terms-abbreviations.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ foveation
242242
fragmentainer
243243
fragmentainers
244244
framebuffers
245+
framebusting
245246
frontmost
246247
Fullband
247248
fullscreened

files/en-us/learn_web_development/core/frameworks_libraries/introduction/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ function buildDeleteButtonEl(id) {
133133

134134
The interesting part to note is that every time we update the state, we need to manually call `renderTodoList` so our state gets synced to the screen. The code that will render our items on the page might read something like this:
135135

136+
```js hidden
137+
const todoFormEl = document.querySelector("#todo-form");
138+
const todoInputEl = document.querySelector("#todo-input");
139+
const todoListEl = document.querySelector("#todo-list");
140+
```
141+
136142
```js
137143
function renderTodoList() {
138144
const frag = document.createDocumentFragment();
@@ -216,10 +222,6 @@ label + input[type="text"] {
216222
```
217223

218224
```js hidden
219-
const todoFormEl = document.querySelector("#todo-form");
220-
const todoInputEl = document.querySelector("#todo-input");
221-
const todoListEl = document.querySelector("#todo-list");
222-
223225
function generateUniqueId(prefix = "prefix") {
224226
return `${prefix}-${Math.floor(Math.random() * Date.now())}`;
225227
}

files/en-us/learn_web_development/core/frameworks_libraries/react_interactivity_events_state/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ import Form from "./components/Form";
597597
import FilterButton from "./components/FilterButton";
598598

599599
function App(props) {
600+
const [tasks, setTasks] = useState(props.tasks);
601+
600602
function addTask(name) {
601603
const newTask = { id: `todo-${nanoid()}`, name, completed: false };
602604
setTasks([...tasks, newTask]);
@@ -619,8 +621,6 @@ function App(props) {
619621
const remainingTasks = tasks.filter((task) => id !== task.id);
620622
setTasks(remainingTasks);
621623
}
622-
623-
const [tasks, setTasks] = useState(props.tasks);
624624
const taskList = tasks?.map((task) => (
625625
<Todo
626626
id={task.id}

files/en-us/learn_web_development/core/scripting/image_gallery/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ h1 {
7979
}
8080

8181
button {
82-
border: 0;
8382
background: rgb(150 150 150 / 0.6);
84-
border: 1px solid #999;
83+
border: 1px solid #999999;
8584
position: absolute;
8685
cursor: pointer;
8786
top: 2px;

files/en-us/learn_web_development/core/structuring_content/debugging_html/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Writing HTML is fine, but what if something goes wrong, and you can't work out w
4141

4242
## Debugging isn't scary
4343

44-
When writing code of some kind, everything is fine, until that dreaded moment when an error occurs — you've done something wrong, so your code doesn't work — either not at all, or not quite how you wanted it to. For example, the following shows an error reported when trying to {{glossary("compile")}} a simple program written in the [Rust](https://www.rust-lang.org/) language.
44+
When writing code of some kind, everything is fine, until that dreaded moment when an error occurs — you've done something wrong, so your code doesn't work — either not at all, or not quite how you wanted it to. For example, the following shows an error reported when trying to {{glossary("compile")}} a simple program written in the [Rust](https://rust-lang.org/) language.
4545

4646
![A console window showing the result of trying to compile a rust program with a missing quote around a string in a print statement. The error message reported is error: unterminated double quote string.](error-message.png)
4747

files/en-us/learn_web_development/extensions/client-side_apis/drawing_graphics/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ function randomRGB() {
9595
return `rgb(${random(0, 255)} ${random(0, 255)} ${random(0, 255)})`;
9696
}
9797

98+
const balls = [];
99+
98100
class Ball {
99101
constructor(x, y, velX, velY, color, size) {
100102
this.x = x;
@@ -148,8 +150,6 @@ class Ball {
148150
}
149151
}
150152

151-
const balls = [];
152-
153153
while (balls.length < 25) {
154154
const size = random(10, 20);
155155
const ball = new Ball(

files/en-us/learn_web_development/extensions/client-side_apis/video_and_audio_apis/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ rwd.addEventListener("click", mediaBackward);
271271
fwd.addEventListener("click", mediaForward);
272272
media.addEventListener("timeupdate", setTime);
273273

274+
let intervalFwd;
275+
let intervalRwd;
276+
274277
function playPauseMedia() {
275278
rwd.classList.remove("active");
276279
fwd.classList.remove("active");
@@ -295,9 +298,6 @@ function stopMedia() {
295298
play.setAttribute("data-icon", "P");
296299
}
297300

298-
let intervalFwd;
299-
let intervalRwd;
300-
301301
function mediaBackward() {
302302
clearInterval(intervalFwd);
303303
fwd.classList.remove("active");

files/en-us/learn_web_development/extensions/forms/styling_web_forms/index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,16 @@ Take the following example:
157157
<input type="checkbox" id="cabbage" name="cabbage" value="cabbage" />
158158
</li>
159159
<li>
160-
<label for="cauli">Cauliflower</label>
161-
<input type="checkbox" id="cauli" name="cauli" value="cauli" />
160+
<label for="cauliflower">Cauliflower</label>
161+
<input
162+
type="checkbox"
163+
id="cauliflower"
164+
name="cauliflower"
165+
value="cauliflower" />
162166
</li>
163167
<li>
164-
<label for="broc">Broccoli</label>
165-
<input type="checkbox" id="broc" name="broc" value="broc" />
168+
<label for="broccoli">Broccoli</label>
169+
<input type="checkbox" id="broccoli" name="broccoli" value="broccoli" />
166170
</li>
167171
</ul>
168172
</fieldset>

files/en-us/learn_web_development/extensions/server-side/first_steps/web_frameworks/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ A lot of high profile companies use Express, including: Uber, Accenture, IBM, et
243243

244244
### Deno (JavaScript)
245245

246-
[Deno](https://deno.com/) is a simple, modern, and secure [JavaScript](/en-US/docs/Web/JavaScript)/TypeScript runtime and framework built on top of Chrome V8 and [Rust](https://www.rust-lang.org/).
246+
[Deno](https://deno.com/) is a simple, modern, and secure [JavaScript](/en-US/docs/Web/JavaScript)/TypeScript runtime and framework built on top of Chrome V8 and [Rust](https://rust-lang.org/).
247247

248248
Deno is powered by [Tokio](https://tokio.rs/) — a Rust-based asynchronous runtime which lets it serve web pages faster. It also has internal support for [WebAssembly](/en-US/docs/WebAssembly), which enables the compilation of binary code for use on the client-side. Deno aims to fill in some of the loop-holes in [Node.js](/en-US/docs/Learn_web_development/Extensions/Server-side/Node_server_without_framework) by providing a mechanism that naturally maintains better security.
249249

files/en-us/web/api/canvas_api/tutorial/pixel_manipulation_with_canvas/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ img.onload = () => {
319319
draw(img);
320320
};
321321

322-
const draw = (image) => {
322+
function draw(image) {
323323
const canvas = document.getElementById("canvas");
324324
const ctx = canvas.getContext("2d");
325325
ctx.drawImage(image, 0, 0);
@@ -350,7 +350,7 @@ const draw = (image) => {
350350
zoom(smoothCtx, x, y);
351351
zoom(pixelatedCtx, x, y);
352352
});
353-
};
353+
}
354354
```
355355

356356
{{embedlivesample("zooming_and_anti-aliasing", , 300)}}

0 commit comments

Comments
 (0)