From 28a027b78e487dbc6827a37cf26a7998e8664343 Mon Sep 17 00:00:00 2001 From: Masahiro Fujimoto Date: Fri, 4 Feb 2022 22:18:11 +0900 Subject: 更新準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/documentfragment/queryselectorall/index.md | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 files/ja/web/api/documentfragment/queryselectorall/index.md (limited to 'files/ja') diff --git a/files/ja/web/api/documentfragment/queryselectorall/index.md b/files/ja/web/api/documentfragment/queryselectorall/index.md new file mode 100644 index 0000000000..a5fc005a4b --- /dev/null +++ b/files/ja/web/api/documentfragment/queryselectorall/index.md @@ -0,0 +1,53 @@ +--- +title: DocumentFragment.querySelectorAll() +slug: Web/API/DocumentFragment/querySelectorAll +tags: + - API + - DOM + - DocumentFragment + - Method +browser-compat: api.DocumentFragment.querySelectorAll +--- +{{ApiRef("DOM")}} + +The **`DocumentFragment.querySelectorAll()`** method returns a +{{domxref("NodeList")}} of elements within the {{domxref("DocumentFragment")}} (using +depth-first pre-order traversal of the document's nodes) that matches the specified +group of selectors. + +If the selectors specified in parameter are invalid a {{domxref("DOMException")}} with +a `SYNTAX_ERR` value is raised. + +## Syntax + +```js +elementList = documentfragment.querySelectorAll(selectors); +``` + +### Parameters + +- _selectors_ + - : Is a {{domxref("DOMString")}} containing one or more CSS selectors separated by + commas. + +## Examples + +This example returns a list of all `div` elements within the +`DocumentFragment` with a class of either "`note`" or +"`alert`": + +```js +var matches = documentfrag.querySelectorAll("div.note, div.alert"); +``` + +## Specifications + +{{Specifications}} + +## Browser compatibility + +{{Compat}} + +## See also + +- The {{domxref("DocumentFragment")}} interface it belongs to. -- cgit v1.2.3-54-g00ecf