diff --git a/files/en-us/web/api/sharedworker/sharedworker/index.md b/files/en-us/web/api/sharedworker/sharedworker/index.md index fe8120879aeb769..4c4a9461275f068 100644 --- a/files/en-us/web/api/sharedworker/sharedworker/index.md +++ b/files/en-us/web/api/sharedworker/sharedworker/index.md @@ -76,7 +76,7 @@ new SharedWorker(url, options) The **`SharedWorker()`** constructor creates a {{domxref("SharedWorker")}} object that executes the classic script or module at the specified URL. -The script must be [same-origin](/en-US/docs/Web/Security/Same-origin_policy) with the associated document, but may itself import scripts or modules that are cross-origin (if permitted by CORS and other restrictions). +The script must be [same-origin](/en-US/docs/Web/Security/Defenses/Same-origin_policy) with the associated document, but may itself import scripts or modules that are cross-origin (if permitted by CORS and other restrictions). If a cross-origin worker is required, users must load it from an intermediate same-origin worker or a blob. For more information see [Description](/en-US/docs/Web/API/Worker/Worker#description) in the `Worker()` constructor. diff --git a/files/en-us/web/api/worker/worker/index.md b/files/en-us/web/api/worker/worker/index.md index 9820484d05000cb..9c55366b21224cd 100644 --- a/files/en-us/web/api/worker/worker/index.md +++ b/files/en-us/web/api/worker/worker/index.md @@ -65,7 +65,7 @@ new Worker(url, options) The **`Worker()`** constructor creates a {{domxref("Worker")}} object that executes the classic script or module at the specified URL. -The script must be [same-origin](/en-US/docs/Web/Security/Same-origin_policy) with the associated document, but may itself import scripts or modules that are cross-origin (if permitted by CORS and other restrictions). +The script must be [same-origin](/en-US/docs/Web/Security/Defenses/Same-origin_policy) with the associated document, but may itself import scripts or modules that are cross-origin (if permitted by CORS and other restrictions). If a cross-origin worker is required, users must load it from an intermediate same-origin worker or a blob. ### Module and classic workers diff --git a/files/en-us/web/javascript/reference/functions/arrow_functions/index.md b/files/en-us/web/javascript/reference/functions/arrow_functions/index.md index c7b6fb22582cdd0..575f4911833e1fe 100644 --- a/files/en-us/web/javascript/reference/functions/arrow_functions/index.md +++ b/files/en-us/web/javascript/reference/functions/arrow_functions/index.md @@ -113,7 +113,7 @@ const b = 2; () => a + b + 100; ``` -The braces can only be omitted if the function directly returns an expression. If the body has statements, the braces are required — and so is the `return` keyword. Arrow functions cannot guess what or when you want to return. +The braces can only be omitted if the function directly returns an expression. If the body has statements, the braces are required. In this case, return values must be explicitly specified with the `return` keyword. Arrow functions cannot guess what or when you want to return. ```js // Traditional anonymous function @@ -145,16 +145,23 @@ const bob2 = (a) => a + 100; Arrow functions can have either an _expression body_ or the usual _block body_. -In an expression body, only a single expression is specified, which becomes the implicit return value. In a block body, you must use an explicit `return` statement. +In an expression body, only a single expression is specified, which becomes the implicit return value. The block body is analogous to traditional function bodies, where return values must be explicitly specified with the `return` keyword. Arrow functions are not required to return a value. If execution of the block body reaches the end without encountering a `return` statement, the function returns `undefined` like other functions. ```js -const func = (x) => x * x; -// expression body syntax, implied "return" +// Expression body +const add = (a, b) => a + b; // Implicitly returns a -const func2 = (x, y) => { - return x + y; +// Block body +const add2 = (a, b) => { + console.log(a, b); + return a + b; // Must explicitly return a value +}; + +// No return value +const add3 = (b) => { + a += b; + // No return statement, so returns undefined }; -// with block body, explicit "return" needed ``` Returning object literals using the expression body syntax `(params) => { object: literal }` does not work as expected. diff --git a/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md b/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md index fd3efd41ef8d5da..c2e5e2df0a8a4ac 100644 --- a/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/intl/datetimeformat/datetimeformat/index.md @@ -91,7 +91,7 @@ Intl.DateTimeFormat(locales, options) - `"short"` - : E.g., `Thu` - `"narrow"` - - : E.g., `T`. Two weekdays may have the same narrow style for some locales (e.g., `Tuesday`'s narrow style is also `T`). + - : E.g., `T`. Two weekdays may have the same narrow style for some locales (e.g., both `Tuesday`'s and `Thursday`'s narrow styles are `T` in the `en-US` locale). - `era` - : The representation of the era. Possible values are: - `"long"` @@ -113,7 +113,7 @@ Intl.DateTimeFormat(locales, options) - `"short"` - : E.g., `Mar` - `"narrow"` - - : E.g., `M`). Two months may have the same narrow style for some locales (e.g., `May`'s narrow style is also `M`). + - : E.g., `M`. Two months may have the same narrow style for some locales (e.g., both `March`'s and `May`'s narrow styles are `M` in the `en-US` locale). - `day` - : The representation of the day. Possible values are `"numeric"` and `"2-digit"`. - `dayPeriod` diff --git a/files/jsondata/L10n-CSS.json b/files/jsondata/L10n-CSS.json index d5b6df07f721c86..6a353655bba9284 100644 --- a/files/jsondata/L10n-CSS.json +++ b/files/jsondata/L10n-CSS.json @@ -16,7 +16,7 @@ "en-US": "At-Rules", "es": "Reglas", "fr": "Règles @", - "ja": "アット規則", + "ja": "アットルール", "ko": "@규칙", "pt-BR": "Regras @", "ru": "@-правила", diff --git a/files/sidebars/cssref.yaml b/files/sidebars/cssref.yaml index fc1d3a95b488548..a114d828c4dbc0e 100644 --- a/files/sidebars/cssref.yaml +++ b/files/sidebars/cssref.yaml @@ -464,24 +464,31 @@ l10n: Animations: アニメーション Backgrounds_and_Borders: 背景と境界 Box alignment: ボックス配置 + Box sizing: ボックスサイズ指定 Box_model: ボックスモデル Cascade: カスケード + Cascading variables: カスケード変数 Colors: 色 Color_contrast: "アクセシビリティ: 色のコントラスト" Columns: 段組み Combinators: 結合子 Conditional_rules: 条件付きルール Containment: コンテナー + Coordinate_systems: 座標系 (API) CSSOM_view: CSSOM view + Custom_functions_and_mixins: カスタム関数とミックスイン Display: 表示方法 + Environment_variables: 環境変数 Filter_effects: フィルター効果 Flexbox: フレックスボックス Fonts: フォント Functions: 関数 Grid: グリッド Images: 画像 + Layout cookbook: レイアウト料理帳 Lists_and_counters: リストとカウンター Logical_properties: 論理的プロパティ + Masking: マスク Media_queries: メディアクエリー Modules: モジュール Nesting: 入れ子のスタイルルール @@ -490,7 +497,8 @@ l10n: Properties: プロパティ Pseudo-classes: 擬似クラス Pseudo-elements: 擬似要素 - Scroll_anchoring: スクロールアンカリング + Scroll_anchoring: スクロール固定 + Scroll-driven_animations: スクロール駆動アニメーション Scroll_snap: スクロールスナップ Selectors: セレクター Shapes: シェイプ @@ -501,7 +509,9 @@ l10n: Transitions: トランジション Tools: ツール Types: データ型 + Values: 値 Values and units: 値と単位 + Writing modes: 書字方向 ko: Guides: 안내서 Animations: 애니메이션 diff --git a/package-lock.json b/package-lock.json index 5fa0f87acecfc52..13e11333375ef98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6339,9 +6339,9 @@ } }, "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", "license": "MIT" }, "node_modules/lowercase-keys": {