Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bd8e8a9

Browse files
committed
minor fixes
1 parent e4a60f4 commit bd8e8a9

File tree

2 files changed

+1
-3
lines changed
  • 1-js/04-object-basics/02-object-copy
  • 3-frames-and-windows/03-cross-window-communication

2 files changed

+1
-3
lines changed

‎1-js/04-object-basics/02-object-copy/article.md‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ alert(clone.sizes.width); // 51, see the result from the other one
215215
216216
To fix that, we should use the cloning loop that examines each value of `user[key]` and, if it's an object, then replicate its structure as well. That is called a "deep cloning".
217217
218-
There's a standard algorithm for deep cloning that handles the case above and more complex cases, called the [Structured cloning algorithm](https://html.spec.whatwg.org/multipage/structured-data.html#safe-passing-of-structured-data).
219-
220218
We can use recursion to implement it. Or, not to reinvent the wheel, take an existing implementation, for instance [_.cloneDeep(obj)](https://lodash.com/docs#cloneDeep) from the JavaScript library [lodash](https://lodash.com).
221219
222220
## Summary

‎3-frames-and-windows/03-cross-window-communication/article.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ The window that wants to send a message calls [postMessage](mdn:api/Window.postM
263263
Arguments:
264264

265265
`data`
266-
: The data to send. Can be any object, the data is cloned using the "structured cloning algorithm". IE supports only strings, so we should `JSON.stringify` complex objects to support that browser.
266+
: The data to send. Can be any object, the data is cloned using the "structured serialization algorithm". IE supports only strings, so we should `JSON.stringify` complex objects to support that browser.
267267

268268
`targetOrigin`
269269
: Specifies the origin for the target window, so that only a window from the given origin will get the message.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /