Skip to content

Commit 28e6849

Browse files
committed
Resolve conflicts.
1 parent f954b57 commit 28e6849

File tree

3 files changed

+0
-57
lines changed

3 files changed

+0
-57
lines changed

1-js/01-getting-started/1-intro/article.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,8 @@ Exemplos de tais restrições incluem:
6767

6868
Os navegadores modernos permitem que ele trabalhe com arquivos, mas o acesso é limitado e fornecido apenas se o usuário executar determinadas ações, como "dropping" de um arquivo em uma janela do navegador ou selecioná-lo por meio de uma tag `<input>`.
6969

70-
<<<<<<< HEAD
7170
Existem maneiras de interagir com a câmera / microfone e outros dispositivos, mas eles exigem permissão explícita do usuário. Assim, uma página habilitada para JavaScript pode não habilmente habilitar uma câmera web, observar os arredores e enviar as informações para a [NSA](https://pt.wikipedia.org/wiki/Ag%C3%AAncia_de_Seguran%C3%A7a_Nacional).
7271
- Diferentes abas/janelas geralmente não se conhecem mutuamente. Às vezes sim, por exemplo, quando uma janela usa JavaScript para abrir a outra. Mas mesmo neste caso, JavaScript de uma página pode não acessar a outra se eles vierem de sites diferentes (de um domínio, protocolo ou porta diferente).
73-
=======
74-
There are ways to interact with camera/microphone and other devices, but they require a user's explicit permission. So a JavaScript-enabled page may not sneakily enable a web-camera, observe the surroundings and send the information to the [NSA](https://en.wikipedia.org/wiki/National_Security_Agency).
75-
- Different tabs/windows generally do not know about each other. Sometimes they do, for example when one window uses JavaScript to open the other one. But even in this case, JavaScript from one page may not access the other if they come from different sites (from a different domain, protocol or port).
76-
>>>>>>> d6e88647b42992f204f57401160ebae92b358c0d
7772

7873
Isso é chamado de "Política de mesma origem ". Para contornar isso, *ambas as páginas* devem conter um código JavaScript especial que lida com a troca de dados.
7974

2-ui/1-document/05-basic-dom-node-properties/article.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,8 @@ The classes are:
2020

2121
- [EventTarget](https://dom.spec.whatwg.org/#eventtarget) -- is the root "abstract" class. Objects of that class are never created. It serves as a base, so that all DOM nodes support so-called "events", we'll study them later.
2222
- [Node](http://dom.spec.whatwg.org/#interface-node) -- is also an "abstract" class, serving as a base for DOM nodes. It provides the core tree functionality: `parentNode`, `nextSibling`, `childNodes` and so on (they are getters). Objects of `Node` class are never created. But there are concrete node classes that inherit from it, namely: `Text` for text nodes, `Element` for element nodes and more exotic ones like `Comment` for comment nodes.
23-
<<<<<<< HEAD
24-
- [Element](http://dom.spec.whatwg.org/#interface-element) -- is a base class for DOM elements. It provides element-level navigation like `nextElementSibling`, `children` and searching methods like `getElementsByTagName`, `querySelector`. In the browser there may be not only HTML, but also XML and SVG documents. The `Element` class serves as a base for more specific classes: `SVGElement`, `XMLElement` and `HTMLElement`.
25-
- [HTMLElement](https://html.spec.whatwg.org/multipage/dom.html#htmlelement) -- is finally the basic class for all HTML elements. It is inherited by various HTML elements:
26-
=======
2723
- [Element](http://dom.spec.whatwg.org/#interface-element) -- is a base class for DOM elements. It provides element-level navigation like `nextElementSibling`, `children` and searching methods like `getElementsByTagName`, `querySelector`. A browser supports not only HTML, but also XML and SVG. The `Element` class serves as a base for more specific classes: `SVGElement`, `XMLElement` and `HTMLElement`.
2824
- [HTMLElement](https://html.spec.whatwg.org/multipage/dom.html#htmlelement) -- is finally the basic class for all HTML elements. It is inherited by concrete HTML elements:
29-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
3025
- [HTMLInputElement](https://html.spec.whatwg.org/multipage/forms.html#htmlinputelement) -- the class for `<input>` elements,
3126
- [HTMLBodyElement](https://html.spec.whatwg.org/multipage/semantics.html#htmlbodyelement) -- the class for `<body>` elements,
3227
- [HTMLAnchorElement](https://html.spec.whatwg.org/multipage/semantics.html#htmlanchorelement) -- the class for `<a>` elements
@@ -36,19 +31,12 @@ So, the full set of properties and methods of a given node comes as the result o
3631

3732
For example, let's consider the DOM object for an `<input>` element. It belongs to [HTMLInputElement](https://html.spec.whatwg.org/multipage/forms.html#htmlinputelement) class. It gets properties and methods as a superposition of:
3833

39-
<<<<<<< HEAD
40-
- `HTMLInputElement` -- this class provides input-specific properties, and inherits from...
41-
- `HTMLElement` -- it provides common HTML element methods (and getters/setters) and inherits from...
42-
- `Element` -- provides generic element methods and inherits from...
43-
- `Node` -- provides common DOM node properties and inherits from...
44-
=======
4534
It gets properties and methods as a superposition of (listed in inheritance order):
4635

4736
- `HTMLInputElement` -- this class provides input-specific properties,
4837
- `HTMLElement` -- it provides common HTML element methods (and getters/setters),
4938
- `Element` -- provides generic element methods,
5039
- `Node` -- provides common DOM node properties,
51-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
5240
- `EventTarget` -- gives the support for events (to be covered),
5341
- ...and finally it inherits from `Object`, so "pure object" methods like `hasOwnProperty` are also available.
5442

@@ -325,13 +313,6 @@ Consider the example:
325313
</script>
326314
```
327315
328-
<<<<<<< HEAD
329-
In the line `(*)` we take the full HTML of `<div>...</div>` and replace it by `<p>...</p>`. In the outer document we can see the new content instead of the `<div>`. But the old `div` variable is still the same.
330-
331-
The `outerHTML` assignment does not modify the DOM element, but extracts it from the outer context and inserts a new piece of HTML instead of it.
332-
333-
Novice developers sometimes make an error here: they modify `div.outerHTML` and then continue to work with `div` as if it had the new content in it.
334-
=======
335316
Looks really odd, right?
336317
337318
In the line `(*)` we replaced `div` with `<p>A new element</p>`. In the outer document (the DOM) we can see the new content instead of the `<div>`. But, as we can see in line `(**)`, the value of the old `div` variable hasn't changed!
@@ -342,15 +323,10 @@ So what happened in `div.outerHTML=...` is:
342323
- `div` was removed from the document.
343324
- Another piece of HTML `<p>A new element</p>` was inserted in its place.
344325
- `div` still has its old value. The new HTML wasn't saved to any variable.
345-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
346326
347327
That's possible with `innerHTML`, but not with `outerHTML`.
348328
349-
<<<<<<< HEAD
350-
We can write to `outerHTML`, but should keep in mind that it doesn't change the element we're writing to. It creates the new content on its place instead. We can get a reference to new elements by querying DOM.
351-
=======
352329
We can write to `elem.outerHTML`, but should keep in mind that it doesn't change the element we're writing to ('elem'). It puts the new HTML in its place instead. We can get references to the new elements by querying the DOM.
353-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
354330
355331
## nodeValue/data: text node content
356332
@@ -501,11 +477,7 @@ Each DOM node belongs to a certain class. The classes form a hierarchy. The full
501477
Main DOM node properties are:
502478
503479
`nodeType`
504-
<<<<<<< HEAD
505-
: We can get `nodeType` from the DOM object class, but often we need just to see if it is a text or element node. The `nodeType` property is good for that. It has numeric values, most important are: `1` -- for elements,`3` -- for text nodes. Read-only.
506-
=======
507480
: We can use it to see if a node is a text or an element node. It has a numeric value: `1` for elements,`3` for text nodes, and a few others for other node types. Read-only.
508-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
509481
510482
`nodeName/tagName`
511483
: For elements, tag name (uppercased unless XML-mode). For non-element nodes `nodeName` describes what it is. Read-only.
@@ -527,8 +499,4 @@ Main DOM node properties are:
527499
528500
DOM nodes also have other properties depending on their class. For instance, `<input>` elements (`HTMLInputElement`) support `value`, `type`, while `<a>` elements (`HTMLAnchorElement`) support `href` etc. Most standard HTML attributes have a corresponding DOM property.
529501
530-
<<<<<<< HEAD
531-
But HTML attributes and DOM properties are not always the same, as we'll see in the next chapter.
532-
=======
533502
However, HTML attributes and DOM properties are not always the same, as we'll see in the next chapter.
534-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3

2-ui/4-forms-controls/1-form-elements/article.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -167,28 +167,18 @@ input.checked = true; // for a checkbox or radio button
167167
```
168168
169169
```warn header="Use `textarea.value`, not `textarea.innerHTML`"
170-
<<<<<<< HEAD
171-
Please note that we should never use `textarea.innerHTML`: it stores only the HTML that was initially on the page, not the current value.
172-
=======
173170
Please note that even though `<textarea>...</textarea>` holds its value as nested HTML, we should never use `textarea.innerHTML` to access it.
174171
175172
It stores only the HTML that was initially on the page, not the current value.
176-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
177173
```
178174
179175
### select and option
180176
181177
A `<select>` element has 3 important properties:
182178
183-
<<<<<<< HEAD
184-
1. `select.options` -- the collection of `<option>` elements,
185-
2. `select.value` -- the value of the chosen option,
186-
3. `select.selectedIndex` -- the number of the selected option.
187-
=======
188179
1. `select.options` -- the collection of `<option>` subelements,
189180
2. `select.value` -- the value of the currently selected `<option>`,
190181
3. `select.selectedIndex` -- the number of the currently selected `<option>`.
191-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
192182
193183
They provide three different ways of setting a value for a `<select>`:
194184
@@ -242,13 +232,9 @@ The full specification of the `<select>` element is available at <https://html.s
242232
243233
### new Option
244234
245-
<<<<<<< HEAD
246-
In the specification of [the option element](https://html.spec.whatwg.org/multipage/forms.html#the-option-element) there's a nice short syntax to create `<option>` elements:
247-
=======
248235
This is rarely used on its own. But there's still an interesting thing.
249236
250237
In the [specification](https://html.spec.whatwg.org/multipage/forms.html#the-option-element) there's a nice short syntax to create `<option>` elements:
251-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3
252238
253239
```js
254240
option = new Option(text, value, defaultSelected, selected);
@@ -306,14 +292,8 @@ Form navigation:
306292
307293
Value is available as `input.value`, `textarea.value`, `select.value` etc, or `input.checked` for checkboxes and radio buttons.
308294
309-
<<<<<<< HEAD
310-
For `<select>` we can also get the value by the index `select.selectedIndex` or through the options collection `select.options`. The full specification of this and other elements is at <https://html.spec.whatwg.org/multipage/forms.html>.
311-
312-
These are the basics to start working with forms. In the next chapter we'll cover `focus` and `blur` events that may occur on any element, but are mostly handled on forms.
313-
=======
314295
For `<select>` we can also get the value by the index `select.selectedIndex` or through the options collection `select.options`.
315296
316297
These are the basics to start working with forms. We'll meet many examples further in the tutorial.
317298
318299
In the next chapter we'll cover `focus` and `blur` events that may occur on any element, but are mostly handled on forms.
319-
>>>>>>> e074a5f825a3d10b0c1e5e82561162f75516d7e3

0 commit comments

Comments
 (0)