2017-10-12 14:09:52 +00:00
|
|
|
/**
|
2018-01-26 03:40:49 +00:00
|
|
|
* Attempts to remove the element from its parentNode in the DOM.
|
2017-10-12 14:09:52 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Dom.RemoveFromDOM
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-01-26 03:40:49 +00:00
|
|
|
* @param {any} element - The DOM element to remove from its parent node.
|
2017-10-12 14:09:52 +00:00
|
|
|
*/
|
2017-01-09 23:54:14 +00:00
|
|
|
var RemoveFromDOM = function (element)
|
2016-11-25 02:08:33 +00:00
|
|
|
{
|
|
|
|
if (element.parentNode)
|
|
|
|
{
|
|
|
|
element.parentNode.removeChild(element);
|
|
|
|
}
|
2017-01-09 23:54:14 +00:00
|
|
|
};
|
2016-11-25 02:08:33 +00:00
|
|
|
|
|
|
|
module.exports = RemoveFromDOM;
|