From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../api/document/createdocumentfragment/index.html | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 files/pl/web/api/document/createdocumentfragment/index.html (limited to 'files/pl/web/api/document/createdocumentfragment') diff --git a/files/pl/web/api/document/createdocumentfragment/index.html b/files/pl/web/api/document/createdocumentfragment/index.html new file mode 100644 index 0000000000..e6bf6e6da3 --- /dev/null +++ b/files/pl/web/api/document/createdocumentfragment/index.html @@ -0,0 +1,43 @@ +--- +title: document.createDocumentFragment +slug: Web/API/Document/createDocumentFragment +tags: + - DOM + - Dokumentacja_Gecko_DOM + - Gecko + - Wszystkie_kategorie +translation_of: Web/API/Document/createDocumentFragment +--- +

{{ ApiRef() }}

+ +

Podsumowanie

+ +

Tworzy pusty fragment dokumentu.

+ +

Składnia

+ +
var fragmentDokumentu = document.createDocumentFragment();
+
+ +

fragmentDokumentu jest odniesieniem do pustego obiektu DocumentFragment.

+ +

Przykład

+ +
var frag = document.createDocumentFragment();
+frag.appendChild(document.createTextNode('Ipsum Lorem'));
+document.body.appendChild(frag);
+
+ +

Uwagi

+ +

DocumentFragment jest minimalnym obiektem dokumentu, który nie posiada rodzica. Obsługuje on następujące metody DOM 2: appendChild, cloneNode, hasAttributes, hasChildNodes, insertBefore, normalize, removeChild, replaceChild.

+ +

Obsługuje on również następujące własności DOM 2: attributes, childNodes, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, textContent.

+ +

Różne inne metody potrafią pobrać fragment dokumentu jako argument (na przykład metody interfejsu Node takie jak appendChild i insertBefore), w przypadku których dodawane lub wstawiane są dzieci fragmentu, nie zaś same fragmenty.

+ +

Specyfikacja

+ +

createDocumentFragment

+ +

{{ languages( { "en": "en/DOM/document.createDocumentFragment" } ) }}

-- cgit v1.2.3-54-g00ecf