Skip to content

Commit

Permalink
fix: Added mockdom.before method (#4724)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnester authored May 30, 2022
1 parent f8ea48f commit ffedba3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ace/test/mockdom.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ function Node(name) {

return node;
};
this.before = function(node) {
if (this.parentNode) this.parentNode.insertBefore(node, this);
};
this.hasChildNodes = function() {
return this.childNodes.length > 0;
};
Expand Down

0 comments on commit ffedba3

Please sign in to comment.