aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/element
diff options
context:
space:
mode:
authorMasahiro FUJIMOTO <mfujimot@gmail.com>2022-03-06 01:17:34 +0900
committerMasahiro FUJIMOTO <mfujimot@gmail.com>2022-03-14 23:40:20 +0900
commite47cf5a3030b9e252b14f3e74f9c8077db0128a7 (patch)
treee38345341b6d291b8609cd1e74fe69b436a1bab7 /files/ja/web/api/element
parent5b2684f66c792426ea84d8371e7e40dfcee2715e (diff)
downloadtranslated-content-e47cf5a3030b9e252b14f3e74f9c8077db0128a7.tar.gz
translated-content-e47cf5a3030b9e252b14f3e74f9c8077db0128a7.tar.bz2
translated-content-e47cf5a3030b9e252b14f3e74f9c8077db0128a7.zip
2021/09/15 時点の英語版に基づき新規翻訳
Diffstat (limited to 'files/ja/web/api/element')
-rw-r--r--files/ja/web/api/element/createshadowroot/index.md43
-rw-r--r--files/ja/web/api/element/getanimations/index.md73
2 files changed, 116 insertions, 0 deletions
diff --git a/files/ja/web/api/element/createshadowroot/index.md b/files/ja/web/api/element/createshadowroot/index.md
new file mode 100644
index 0000000000..f0c4e5709f
--- /dev/null
+++ b/files/ja/web/api/element/createshadowroot/index.md
@@ -0,0 +1,43 @@
+---
+title: Element.createShadowRoot()
+slug: Web/API/Element/createShadowRoot
+tags:
+ - API
+ - Deprecated
+ - Element
+ - メソッド
+ - Non-standard
+ - リファレンス
+ - shadow dom
+browser-compat: api.Element.createShadowRoot
+---
+{{APIRef('Shadow DOM')}}{{non-standard_header}}{{deprecated_header}}
+
+Use `Element.createShadowRoot` to create an instance of [shadow DOM](/ja/docs/Web/Web_Components/Using_shadow_DOM). When shadow DOM is
+created, it is always attached to an existing element. After the shadow DOM is created,
+the element that it is attached to is called the {{glossary("shadow root")}}.
+
+> **Note:** This method has been deprecated in favor of
+> {{DOMxRef("Element.attachShadow()","attachShadow()")}}.
+
+## 構文
+
+```js
+var shadowroot = element.createShadowRoot();
+```
+
+### 引数
+
+No parameters.
+
+### Result value
+
+Returns a {{DOMxRef("ShadowRoot")}}.
+
+## 仕様書
+
+This feature is no longer defined by any specifications.
+
+## ブラウザーの互換性
+
+{{Compat}}
diff --git a/files/ja/web/api/element/getanimations/index.md b/files/ja/web/api/element/getanimations/index.md
new file mode 100644
index 0000000000..2ab0b9efe4
--- /dev/null
+++ b/files/ja/web/api/element/getanimations/index.md
@@ -0,0 +1,73 @@
+---
+title: Element.getAnimations()
+slug: Web/API/Element/getAnimations
+tags:
+ - API
+ - Animatable
+ - CSS
+ - CSS アニメーション
+ - CSS トランジション
+ - Element
+ - 実験的
+ - メソッド
+ - リファレンス
+ - トランジション
+ - ウェブアニメーション
+ - getAnimations
+ - waapi
+ - web animations api
+browser-compat: api.Element.getAnimations
+translation_of: Web/API/Element/getAnimations
+---
+{{ SeeCompatTable() }}{{APIRef("Web Animations")}}
+
+`getAnimations()` は {{domxref("Element")}} インターフェイスのメソッドで(`Animatable` ミックスインで指定されており)、この要素に影響を与える、あるいは将来的に影響を与える予定のすべての {{domxref("Animation")}} オブジェクトの配列を返します。オプションとして、子孫要素の {{domxref("Animation")}} オブジェクトも返すことができます。
+
+> **Note:** この配列には [CSS アニメーション](/ja/docs/Web/CSS/CSS_Animations)、[CSS トランジション](/ja/docs/Web/CSS/CSS_Transitions)、[ウェブアニメーション](/ja/docs/Web/API/Web_Animations_API)が含まれます。
+
+## 構文
+
+```js
+const animations = Element.getAnimations(options);
+```
+
+### 引数
+
+- `options {{optional_inline}}`
+
+ - : 以下のプロパティを含むオプションオブジェクトです。
+
+ - `subtree`
+ - : 論理値で、`true` の場合、 _Element_ の子孫をターゲットとしたアニメーションも返すようになります。これは、 _Element_ やその子孫に付けられた CSS [擬似要素](/ja/docs/Web/CSS/Pseudo-elements)をターゲットとするアニメーションを含みます。既定値は `false` です。
+
+### 返値
+
+{{domxref("Animation")}} オブジェクトの配列 ({{jsxref("Array")}}) で、それぞれが
+このメソッドが呼び出された {{domxref("Element")}}、または `{ subtree: true }` が指定されている場合は、その子孫の要素の 1 つを現在ターゲットにしているアニメーションです。
+
+## 例
+
+以下のコードでは、 `elem` とその子孫のすべてのアニメーションが終了するのを待ってから、文書からその要素を削除します。
+
+```js
+Promise.all(
+ elem.getAnimations({ subtree: true })
+ .map(animation => animation.finished)
+).then(() => elem.remove());
+```
+
+## 仕様書
+
+{{Specifications}}
+
+## ブラウザーの互換性
+
+{{Compat}}
+
+## 関連情報
+
+- [ウェブアニメーション API](/ja/docs/Web/API/Web_Animations_API)
+- [CSS アニメーション](/ja/docs/Web/CSS/CSS_Animations)
+- [CSS トランジション](/ja/docs/Web/CSS/CSS_Transitions)
+- {{domxref("Document.getAnimations()")}} - 文書内のすべてのアニメーションを読み取る
+- {{domxref("Animation")}}