From 89c8adcf20210238fb0aca3705d19979cc7c3d51 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Tue, 18 Jan 2022 15:27:15 +0900 Subject: 2021/10/03 時点の英語版に同期 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/html/global_attributes/slot/index.md | 63 ++++++++--------------- 1 file changed, 22 insertions(+), 41 deletions(-) (limited to 'files/ja/web') diff --git a/files/ja/web/html/global_attributes/slot/index.md b/files/ja/web/html/global_attributes/slot/index.md index 95c74b04c4..831a0a8319 100644 --- a/files/ja/web/html/global_attributes/slot/index.md +++ b/files/ja/web/html/global_attributes/slot/index.md @@ -2,47 +2,28 @@ title: slot slug: Web/HTML/Global_attributes/slot tags: - - Global attributes + - グローバル属性 - HTML - - Reference + - リファレンス +browser-compat: html.global_attributes.slot translation_of: Web/HTML/Global_attributes/slot --- -
{{HTMLSidebar("Global_attributes")}}
- -

slotグローバル属性で、シャドウ DOM のシャドウツリー内にあるスロットをある要素に割り当てます。 slot 属性をもつ要素は、{{htmlattrxref("name", "slot")}} 属性の値がその slot 属性の値と一致する {{HTMLElement("slot")}} 要素により生成されたスロットに割り当てられます。

- -

例えば、テンプレートとスロットの使用ガイドをみてください。

- -

仕様書

- - - - - - - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('HTML WHATWG', "dom.html#attr-slot", "slot attribute")}}{{Spec2('HTML WHATWG')}}
{{SpecName('DOM WHATWG', "#dom-element-slot", "slot attribute")}}{{Spec2('DOM WHATWG')}}
- -

ブラウザーの互換性

- -

{{Compat("html.global_attributes.slot")}}

- -

関連情報

- - + +{{HTMLSidebar("Global_attributes")}} + +**`slot`** は[グローバル属性](/ja/docs/Web/HTML/Global_attributes)で、[シャドウ DOM](/ja/docs/Web/Web_Components/Using_shadow_DOM) のシャドウツリー内にあるスロットを、ある要素に割り当てます。 `slot` 属性をもつ要素には、 {{HTMLElement("slot")}} 要素に {{htmlattrxref("name", "slot")}} 属性の値を指定することで生成されたスロット +の値がその `slot` 属性の値と一致する生成されたスロットに割り当てられます。 + +例については、[テンプレートとスロットの使用](/ja/docs/Web/Web_Components/Using_templates_and_slots)ガイドを参照してください。 + +## 仕様書 + +{{Specifications}} + +## ブラウザーの互換性 + +{{Compat}} + +## 関連情報 + +- すべての[グローバル属性](/ja/docs/Web/HTML/Global_attributes) -- cgit v1.2.3-54-g00ecf