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: 1-js/05-data-types/10-destructuring-assignment/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
개발을 하다 보면 함수에 객체나 배열을 전달해야 하는 경우가 생기곤 합니다. 가끔은 객체나 배열에 저장된 데이터 전체가 아닌 일부만 필요한 경우가 생기기도 하죠.
8
8
9
9
이럴 때 객체나 배열을 변수로 '분해'할 수 있게 해주는 특별한 문법인 *구조 분해 할당(destructuring assignment)* 을 사용할 수 있습니다. 이 외에도 함수의 매개변수가 많거나 매개변수 기본값이 필요한 경우 등에서 구조 분해(destructuring)는 그 진가를 발휘합니다.
10
+
*Destructuring assignment* is a special syntax that allows us to "unpack" arrays or objects into a bunch of variables, as sometimes that's more convenient.
- Reading (`get`), writing (`set`), deleting (`deleteProperty`) a property (even a non-existing one).
1017
1017
- Calling a function (`apply` trap).
1018
1018
- The `new` operator (`construct` trap).
1019
-
- Many other operations (the full list is at the beginning of the article and in the [docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)).
1019
+
- Many other operations (the full list is at the beginning of the article and in the [docs](mdn:/JavaScript/Reference/Global_Objects/Proxy)).
1020
1020
1021
1021
That allows us to create "virtual" properties and methods, implement default values, observable objects, function decorators and so much more.
1022
1022
1023
1023
We can also wrap an object multiple times in different proxies, decorating it with various aspects of functionality.
1024
1024
1025
-
The [Reflect](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect) API is designed to complement [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy). For any `Proxy` trap, there's a `Reflect` call with same arguments. We should use those to forward calls to target objects.
1025
+
The [Reflect](mdn:/JavaScript/Reference/Global_Objects/Reflect) API is designed to complement [Proxy](mdn:/JavaScript/Reference/Global_Objects/Proxy). For any `Proxy` trap, there's a `Reflect` call with same arguments. We should use those to forward calls to target objects.
Copy file name to clipboardExpand all lines: 2-ui/3-event-details/3-mousemove-mouseover-mouseout-mouseenter-mouseleave/2-hoverintent/solution.view/hoverIntent.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,7 @@ class HoverIntent {
88
88
if(speed<this.sensitivity){
89
89
clearInterval(this.checkSpeedInterval);
90
90
this.isHover=true;
91
-
this.over.call(this.elem,event);
91
+
this.over.call(this.elem);
92
92
}else{
93
93
// speed fast, remember new coordinates as the previous ones
Copy file name to clipboardExpand all lines: 2-ui/99-ui-misc/02-selection-range/article.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,7 +259,7 @@ Click buttons to run methods on the selection, "resetExample" to reset it.
259
259
</script>
260
260
```
261
261
262
-
There also exist methods to compare ranges, but these are rarely used. When you need them, please refer to the [spec](https://dom.spec.whatwg.org/#interface-range) or [MDN manual](https://developer.mozilla.org/en-US/docs/Web/API/Range).
262
+
There also exist methods to compare ranges, but these are rarely used. When you need them, please refer to the [spec](https://dom.spec.whatwg.org/#interface-range) or [MDN manual](mdn:/api/Range).
Copy file name to clipboardExpand all lines: 3-frames-and-windows/01-popup-windows/article.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ Settings for `params`:
87
87
88
88
There is also a number of less supported browser-specific features, which are usually not used. Check <ahref="https://developer.mozilla.org/en/DOM/window.open">window.open in MDN</a> for examples.
89
89
90
-
## Example: a minimalistic window
90
+
## Example: a minimalistic window
91
91
92
92
Let's open a window with minimal set of features, just to see which of them browser allows to disable:
93
93
@@ -120,7 +120,7 @@ Rules for omitted settings:
120
120
121
121
## Accessing popup from window
122
122
123
-
The `open` call returns a reference to the new window. It can be used to manipulate it's properties, change location and even more.
123
+
The `open` call returns a reference to the new window. It can be used to manipulate its properties, change location and even more.
124
124
125
125
In this example, we generate popup content from JavaScript:
126
126
@@ -239,7 +239,7 @@ There's also `window.onscroll` event.
239
239
240
240
Theoretically, there are `window.focus()` and `window.blur()` methods to focus/unfocus on a window. And there are also `focus/blur` events that allow to catch the moment when the visitor focuses on a window and switches elsewhere.
241
241
242
-
Although, in practice they are severely limited, because in the past evil pages abused them.
242
+
Although, in practice they are severely limited, because in the past evil pages abused them.
243
243
244
244
For instance, look at this code:
245
245
@@ -257,10 +257,10 @@ Still, there are some use cases when such calls do work and can be useful.
257
257
258
258
For instance:
259
259
260
-
- When we open a popup, it's might be a good idea to run a`newWindow.focus()` on it. Just in case, for some OS/browser combinations it ensures that the user is in the new window now.
260
+
- When we open a popup, it might be a good idea to run `newWindow.focus()` on it. Just in case, for some OS/browser combinations it ensures that the user is in the new window now.
261
261
- If we want to track when a visitor actually uses our web-app, we can track `window.onfocus/onblur`. That allows us to suspend/resume in-page activities, animations etc. But please note that the `blur` event means that the visitor switched out from the window, but they still may observe it. The window is in the background, but still may be visible.
262
262
263
-
## Summary
263
+
## Summary
264
264
265
265
Popup windows are used rarely, as there are alternatives: loading and displaying information in-page, or in iframe.
0 commit comments