-
Notifications
You must be signed in to change notification settings - Fork 1
isDOMRoot
Toke Voltelen edited this page Dec 4, 2016
·
3 revisions
Is the given object root node of the DOM
-
obj
(Object) - The object to check. - returns (Boolean) - Is the given object root node of the DOM or not.
import isDOMRoot from 'vanillajs-browser-helpers/isDOMRoot';
isDOMRoot(document.body); // -> False
isDOMRoot(document.documentElement); // -> true