mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Define missing DomElement.remove().
This commit is contained in:
parent
a646f922d4
commit
fbe8095d1b
1 changed files with 5 additions and 0 deletions
|
@ -130,6 +130,11 @@ var DomElement = new function() {
|
|||
new RegExp('\\s*' + cls + '\\s*'), ' ').trim();
|
||||
},
|
||||
|
||||
remove: function(el) {
|
||||
if (el.parentNode)
|
||||
el.parentNode.removeChild(el);
|
||||
},
|
||||
|
||||
removeChildren: function(el) {
|
||||
while (el.firstChild)
|
||||
el.removeChild(el.firstChild);
|
||||
|
|
Loading…
Reference in a new issue