This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The DocumentFragment() constructor returns an empty newly created DocumentFragment object .

Syntax

fragment = new DocumentFragment()

Example

fragment = new DocumentFragment();

Specification

Specification Status Comment
DOM
The definition of 'DocumentFragment.DocumentFragment()' in that specification.
Living Standard Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Experimental
Chrome Full support 28Edge No support NoFirefox Full support 24IE No support NoOpera Full support 15Safari No support NoWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 24Opera Android Full support YesSafari iOS ? Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.

See also

Document Tags and Contributors

Contributors to this page: miket, angel-luis, ExE-Boss, fscholz, jsx, nseptier, nairakhil13, teoli
Last updated by: miket,