summaryrefslogtreecommitdiff
path: root/spec/frontend/__helpers__/dom_shims/scroll_by.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/__helpers__/dom_shims/scroll_by.js')
-rw-r--r--spec/frontend/__helpers__/dom_shims/scroll_by.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/frontend/__helpers__/dom_shims/scroll_by.js b/spec/frontend/__helpers__/dom_shims/scroll_by.js
new file mode 100644
index 00000000000..90387e51765
--- /dev/null
+++ b/spec/frontend/__helpers__/dom_shims/scroll_by.js
@@ -0,0 +1,7 @@
+window.scrollX = 0;
+window.scrollY = 0;
+
+window.scrollBy = (x, y) => {
+ window.scrollX += x;
+ window.scrollY += y;
+};