phaser
Version:
A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.
24 lines (21 loc) • 607 B
JavaScript
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2018 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* Attempts to remove the element from its parentNode in the DOM.
*
* @function Phaser.DOM.RemoveFromDOM
* @since 3.0.0
*
* @param {HTMLElement} element - The DOM element to remove from its parent node.
*/
var RemoveFromDOM = function (element)
{
if (element.parentNode)
{
element.parentNode.removeChild(element);
}
};
module.exports = RemoveFromDOM;