From 7e298ed158314930b9efaa48fe4a528fa6935ec9 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Sun, 29 May 2022 17:03:54 +0200 Subject: [PATCH] fix: Added mockdom.before method --- lib/ace/test/mockdom.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ace/test/mockdom.js b/lib/ace/test/mockdom.js index 2d0128e040a..7158f7cac0e 100644 --- a/lib/ace/test/mockdom.js +++ b/lib/ace/test/mockdom.js @@ -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; };