From 41565d2bb720fa2360cc4c27d877c8296a956364 Mon Sep 17 00:00:00 2001 From: Homero304 Date: Mon, 31 Aug 2020 22:21:26 -0500 Subject: [PATCH 01/11] Cross-window communication --- .../03-cross-window-communication/article.md | 260 +++++++++--------- .../postmessage.view/iframe.html | 4 +- .../postmessage.view/index.html | 4 +- .../sandbox.view/index.html | 2 +- .../sandbox.view/sandboxed.html | 4 +- 5 files changed, 137 insertions(+), 137 deletions(-) diff --git a/3-frames-and-windows/03-cross-window-communication/article.md b/3-frames-and-windows/03-cross-window-communication/article.md index 53f5f55fc..f9d9ce9f6 100644 --- a/3-frames-and-windows/03-cross-window-communication/article.md +++ b/3-frames-and-windows/03-cross-window-communication/article.md @@ -1,88 +1,88 @@ -# Cross-window communication +# Comunicación entre ventanas -The "Same Origin" (same site) policy limits access of windows and frames to each other. +La política de "Mismo origen" (mismo sitio) limita el acceso de ventanas y marcos entre sí. -The idea is that if a user has two pages open: one from `john-smith.com`, and another one is `gmail.com`, then they wouldn't want a script from `john-smith.com` to read our mail from `gmail.com`. So, the purpose of the "Same Origin" policy is to protect users from information theft. +La idea es que si un usuario tiene dos páginas abiertas: una de `john-smith.com`, y otra es` gmail.com`, entonces no querrán que un script de `john-smith.com` lea nuestro correo de `gmail.com`. Por lo tanto, el propósito de la política de "Mismo origen" es proteger a los usuarios del robo de información. -## Same Origin [#same-origin] +## Mismo origen [#same-origin] -Two URLs are said to have the "same origin" if they have the same protocol, domain and port. +Se dice que dos URL tienen el "mismo origen" si tienen el mismo protocolo, dominio y puerto. -These URLs all share the same origin: +Todas estas URL comparten el mismo origen: - `http://site.com` - `http://site.com/` - `http://site.com/my/page.html` -These ones do not: +Estas no: -- http://www.site.com (another domain: `www.` matters) -- http://site.org (another domain: `.org` matters) -- https://site.com (another protocol: `https`) -- http://site.com:8080 (another port: `8080`) +- http://www.site.com (otro dominio: `www.` importa) +- http://site.org (otro dominio: `.org` importa) +- https://site.com (otro protocolo: `https`) +- http://site.com:8080 (otro puerto: `8080`) -The "Same Origin" policy states that: +La política de "Mismo origen" establece que: -- if we have a reference to another window, e.g. a popup created by `window.open` or a window inside `