You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 3-frames-and-windows/01-popup-windows/article.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -7,15 +7,15 @@ Basically, you just run:
7
7
window.open('https://javascript.info/')
8
8
```
9
9
10
-
...And it will open a new window with given URL. Most modern browsers are configured to open new tabs instead of separate windows.
10
+
...And it will open a new window with given URL. Most modern browsers are configured to open url in new tabs instead of separate windows.
11
11
12
12
Popups exist from really ancient times. The initial idea was to show another content without closing the main window. As of now, there are other ways to do that: we can load content dynamically with [fetch](info:fetch) and show it in a dynamically generated `<div>`. So, popups is not something we use everyday.
13
13
14
14
Also, popups are tricky on mobile devices, that don't show multiple windows simultaneously.
15
15
16
16
Still, there are tasks where popups are still used, e.g. for OAuth authorization (login with Google/Facebook/...), because:
17
17
18
-
1. A popup is a separate window with its own independent JavaScript environment. So opening a popup from a third-party non-trusted site is safe.
18
+
1. A popup is a separate window which has its own independent JavaScript environment. So opening a popup from a third-party, non-trusted site is safe.
19
19
2. It's very easy to open a popup.
20
20
3. A popup can navigate (change URL) and send messages to the opener window.
21
21
@@ -89,7 +89,7 @@ There is also a number of less supported browser-specific features, which are us
89
89
90
90
## Example: a minimalistic window
91
91
92
-
Let's open a window with minimal set of features just to see which of them browser allows to disable:
92
+
Let's open a window with minimal set of features, just to see which of them browser allows to disable:
93
93
94
94
```js run
95
95
let params =`scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,
0 commit comments