Sign in
chromium
/
external
/
github.com
/
SeleniumHQ
/
selenium
/
refs/heads/api-docs-4.30.0-all
/
.
/
node_modules
/
dom-helpers
/
esm
/
clear.js
blob: 28accf8b6391bc4017ea866926a9f409d95f952d [
file
] [
log
] [
blame
] [
edit
]
/**
* Removes all child nodes from a given node.
*
* @param node the node to clear
*/
export
default
function
clear
(
node
)
{
if
(
node
)
{
while
(
node
.
firstChild
)
{
node
.
removeChild
(
node
.
firstChild
);
}
return
node
;
}
return
null
;
}