-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert /api/s-x folder to Markdown (es) (#9504)
* api/s-x html cleanup * api/s-x rename html to md * api/s-x h2m replace * api/s-x linting with 8181 .markdownlint-cli2.jsonc * api/s-x drop the url title attributes * api/s-x remove languages macro * Apply suggestions from code review
- Loading branch information
Showing
198 changed files
with
9,103 additions
and
10,490 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: addRange | ||
slug: Web/API/Selection/addRange | ||
tags: | ||
- páginas_a_traducir | ||
translation_of: Web/API/Selection/addRange | ||
--- | ||
{{ ApiRef("DOM") }} | ||
|
||
### Resumen | ||
|
||
Añade un objeto de rango a la selección. | ||
|
||
### Sintaxis | ||
|
||
``` | ||
sel.addRange(range) | ||
``` | ||
|
||
### Parámetros | ||
|
||
- _`range`_ | ||
- : Un objeto [range](es/DOM/range) que será añadido a la selección. | ||
|
||
### Ejemplos | ||
|
||
``` | ||
/* Seleccionar todos los elementos en NEGRITA en un documento HTML */ | ||
var strongs = document.getElementsByTagName("strong"); | ||
var s = window.getSelection(); | ||
if(s.rangeCount > 0) s.removeAllRanges(); | ||
for(var i = 0; i < strongs.length; i++) { | ||
var range = document.createRange(); | ||
range.selectNode(strongs[i]); | ||
s.addRange(range); | ||
} | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: anchorNode | ||
slug: Web/API/Selection/anchorNode | ||
tags: | ||
- páginas_a_traducir | ||
translation_of: Web/API/Selection/anchorNode | ||
--- | ||
{{ ApiRef("DOM") }} | ||
|
||
### Resumen | ||
|
||
Devuelve el nodo en el cual empieza la selección. | ||
|
||
### Sintaxis | ||
|
||
``` | ||
sel.anchorNode | ||
``` | ||
|
||
### Notas | ||
|
||
Un usuario puede hacer una selección de izquierda a derecha (en el orden del documento) o de derehca a izquierda (en el orden contrario del documento). El ancla es donde el usuario empezó la selección. Ésta puede ser visualizada manteniendo presionada la tecla **Shift** y presionando las flechas de movimiento del teclado. El ancla de la selección no se mueve, pero el foco de ésta (el otro "final" de la selección) sí se mueve. |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: anchorOffset | ||
slug: Web/API/Selection/anchorOffset | ||
tags: | ||
- páginas_a_traducir | ||
translation_of: Web/API/Selection/anchorOffset | ||
--- | ||
{{ ApiRef("DOM") }} | ||
|
||
### Resumen | ||
|
||
Devuelve el número de caracteres en que el ancla de la selección es colocada dentro de [anchorNode](es/DOM/Selection/anchorNode). | ||
|
||
### Sintaxis | ||
|
||
``` | ||
sel.anchorOffset | ||
``` | ||
|
||
### Notas | ||
|
||
Este número está basado en cero. Si la selección empieza con el primer carácter en [anchorNode](es/DOM/Selection/anchorNode), el número devuelto será 0. |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: collapse | ||
slug: Web/API/Selection/collapse | ||
tags: | ||
- páginas_a_traducir | ||
translation_of: Web/API/Selection/collapse | ||
--- | ||
{{ ApiRef("DOM") }} | ||
|
||
### Resumen | ||
|
||
Pliega la selección a un simple punto. El documento no es modificado. Si el contenido es enfocado y editable, el cursor parpadeará ahí. | ||
|
||
### Sintaxis | ||
|
||
``` | ||
sel.collapse( | ||
parentNode, | ||
offset); | ||
``` | ||
|
||
### Parámetros | ||
|
||
- _`parentNode`_ | ||
- : La localización del cursor estará dentro de este nodo. | ||
|
||
<!----> | ||
|
||
- _`offset`_ | ||
- : El cursor estará colocado éste número de caracteres desdel el comienzo del texto de | ||
_`parentNode`'_ | ||
s text. | ||
|
||
### Ejemplos | ||
|
||
``` | ||
/* Colocar el cursor al principio del cuerpo de un documento HTML. */ | ||
var body = document.getElementsByTagName("body")[0]; | ||
window.getSelection().collapse(body,0); | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: collapseToEnd | ||
slug: Web/API/Selection/collapseToEnd | ||
tags: | ||
- páginas_a_traducir | ||
translation_of: Web/API/Selection/collapseToEnd | ||
--- | ||
{{ ApiRef("DOM") }} | ||
|
||
### Resumen | ||
|
||
Traslada el ancla hasta el mismo punto del foco. El foco no se mueve. Si el contenido es enfocado y editable, el cursor parpadeará ahí. | ||
|
||
### Sintaxis | ||
|
||
``` | ||
sel.collapseToEnd() | ||
``` | ||
|
||
### Parámetros | ||
|
||
Ninguno. |
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: collapseToStart | ||
slug: Web/API/Selection/collapseToStart | ||
tags: | ||
- páginas_a_traducir | ||
translation_of: Web/API/Selection/collapseToStart | ||
--- | ||
{{ ApiRef("DOM") }} | ||
|
||
### Resumen | ||
|
||
Traslada el foco de la selección al mismo punto que el ancla. El ancla no se mueve. Si el contenido es enfocado y editable, el cursor parpadeará ahí. | ||
|
||
### Sintaxis | ||
|
||
``` | ||
sel.collapseToStart() | ||
``` | ||
|
||
### Parámetros | ||
|
||
Ninguno. |
Oops, something went wrong.