diff options
author | href <href@random.sh> | 2021-09-01 10:30:18 +0200 |
---|---|---|
committer | href <href@random.sh> | 2021-09-01 10:30:18 +0200 |
commit | 75687711f35355bc30e4829439384aab28fcac6d (patch) | |
tree | 8f3256f472893c39720a684d390e890a152f7303 /priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js | |
parent | link: post_* callbacks; html & pdftitle. (diff) |
Commit all the changes that hasn't been committed + updates.
Diffstat (limited to 'priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js')
-rw-r--r-- | priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js b/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js new file mode 100644 index 0000000..22d30ad --- /dev/null +++ b/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js @@ -0,0 +1,20 @@ +function generateMouseEvent(type) { + var event = document.createEvent('MouseEvent'); + event.initEvent(type, true, true); + return event; +} + +// essentially the same as $.extend +function extend(){ + var result = {}, + $__arguments = [].slice.call(arguments); + + $__arguments.forEach(function(obj) { + for (var prop in obj) { + if (obj.hasOwnProperty(prop)) { + result[prop] = obj[prop]; + } + } + }); + return result; +} |