mirror of
https://github.com/photonstorm/phaser
synced 2024-12-25 20:43:26 +00:00
17 lines
374 B
JavaScript
17 lines
374 B
JavaScript
/**
|
|
* Attempts to remove the element from its parentNode in the DOM.
|
|
*
|
|
* @function Phaser.Dom.RemoveFromDOM
|
|
* @since 3.0.0
|
|
*
|
|
* @param {any} element - The DOM element to remove from its parent node.
|
|
*/
|
|
var RemoveFromDOM = function (element)
|
|
{
|
|
if (element.parentNode)
|
|
{
|
|
element.parentNode.removeChild(element);
|
|
}
|
|
};
|
|
|
|
module.exports = RemoveFromDOM;
|