-
Notifications
You must be signed in to change notification settings - Fork 59
Modifying document #281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
longo-andrea
merged 5 commits into
javascript-tutorial:master
from
Dorin-David:modifying-document
Apr 6, 2021
Merged
Modifying document #281
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ecb4bf1
Merge branch 'master' of https://github.com/javascript-tutorial/it.ja…
Dorin-David 61773e6
Merge branch 'master' of https://github.com/javascript-tutorial/it.ja…
Dorin-David 46fb75e
Modifying the document
Dorin-David 6e8c784
Apply suggestions from code review
Dorin-David bf58681
Merge branch 'master' into modifying-document
longo-andrea File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,10 +1,10 @@ | ||||||
| importance: 5 | ||||||
| importanza: 5 | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| # createTextNode vs innerHTML vs textContent | ||||||
|
|
||||||
| We have an empty DOM element `elem` and a string `text`. | ||||||
| Abbiamo `elem`, un elemento DOM vuoto, e una stringa`text`. | ||||||
|
|
||||||
| Which of these 3 commands will do exactly the same? | ||||||
|
||||||
| Which of these 3 commands will do exactly the same? | |
| Quali fra questi 3 comandi producono esattamente lo stesso risultato? |
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
2-ui/1-document/07-modifying-document/10-clock-setinterval/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| importance: 4 | ||
| importanza: 4 | ||
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| --- | ||
|
|
||
| # Colored clock with setInterval | ||
| # Orologio colorato con setInterval | ||
|
|
||
| Create a colored clock like here: | ||
| Crea un orologio colorato come qui: | ||
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [iframe src="solution" height=60] | ||
|
|
||
| Use HTML/CSS for the styling, JavaScript only updates time in elements. | ||
| Usa HTML/CSS per lo styling, JavaScript aggiorna solo il tempo negli elementi. | ||
4 changes: 2 additions & 2 deletions
4
2-ui/1-document/07-modifying-document/11-append-to-list/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
2-ui/1-document/07-modifying-document/11-append-to-list/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,5 +23,5 @@ | |
| </table> | ||
|
|
||
| <script> | ||
| // ... your code ... | ||
| // ... il tuo codice ... | ||
| </script> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
2-ui/1-document/07-modifying-document/5-why-aaa/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| The HTML in the task is incorrect. That's the reason of the odd thing. | ||
| L'HTML nella task è incorretta. Questa è la ragione della stranezza. | ||
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The browser has to fix it automatically. But there may be no text inside the `<table>`: according to the spec only table-specific tags are allowed. So the browser adds `"aaa"` *before* the `<table>`. | ||
| Il browser deve sistemarla automaticamente. Ma non vi può essere testo dentro a `<table>`: secondo la specifica, solo gli specifici tag per le tabelle sono permessi. Perciò il browser aggiunge `"aaa"` *prima* di `<table>`. | ||
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Now it's obvious that when we remove the table, it remains. | ||
| Ora è ovvio perché, rimuovendo la tabella, il testo rimane. | ||
|
|
||
| The question can be easily answered by exploring the DOM using the browser tools. It shows `"aaa"` before the `<table>`. | ||
| La domanda può facilmente trovare risposta esplorando il DOM con gli strumenti del browser. Mostra `"aaa"` prima di `<table>`. | ||
|
|
||
| The HTML standard specifies in detail how to process bad HTML, and such behavior of the browser is correct. | ||
| Lo standart HTML specifica in dettaglio come processare cattivo HTML, e questo comportamento del browser è corretto. | ||
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
2-ui/1-document/07-modifying-document/6-create-list/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| Please note the usage of `textContent` to assign the `<li>` content. | ||
| Nota l'utilizzo di `textContent` per assegnare il contenuto a `<li>`. |
18 changes: 9 additions & 9 deletions
18
2-ui/1-document/07-modifying-document/6-create-list/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| importance: 4 | ||
| importanza: 4 | ||
Dorin-David marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| --- | ||
|
|
||
| # Create a list | ||
| # Crea una lista | ||
|
|
||
| Write an interface to create a list from user input. | ||
| Scrivi un'interfaccia per creare una lista dagli input dell'utente. | ||
|
|
||
| For every list item: | ||
| Per ogni elemento della lista: | ||
|
|
||
| 1. Ask a user about its content using `prompt`. | ||
| 2. Create the `<li>` with it and add it to `<ul>`. | ||
| 3. Continue until the user cancels the input (by pressing `key:Esc` or via an empty entry). | ||
| 1. Chiedi all'utente il contenuto utilizzando `prompt`. | ||
| 2. Crea il `<li>` con il contenuto e aggiungilo a `<ul>`. | ||
| 3. Continua fino a quando l'utente non interrompe l'input (premendo `key:Esc` o inserendo un contenuto vuoto) | ||
|
|
||
| All elements should be created dynamically. | ||
| Tutti gli elementi devono essere creati dinamicamente. | ||
|
|
||
| If a user types HTML-tags, they should be treated like a text. | ||
| Se l'utente inserisce tag HTML, questi devono essere trattati come testo. | ||
|
|
||
| [demo src="solution"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
2-ui/1-document/07-modifying-document/7-create-object-tree/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| The easiest way to walk the object is to use recursion. | ||
| Il modo più semplice per percorrere l'oggetto è utilizzando la ricorsione. | ||
|
|
||
| 1. [The solution with innerHTML](sandbox:innerhtml). | ||
| 2. [The solution with DOM](sandbox:build-tree-dom). | ||
| 1. [La soluzione con innerHTML](sandbox:innerhtml). | ||
| 2. [La soluzione con DOM](sandbox:build-tree-dom). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| To append text to each `<li>` we can alter the text node `data`. | ||
| Per appendere testo a ogni `<li>` possiamo modificare il nodo di testo `data`. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.