diff options
Diffstat (limited to 'common/modules/dom.jsm')
-rw-r--r-- | common/modules/dom.jsm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/modules/dom.jsm b/common/modules/dom.jsm index ccb7e7ca..5a7a9a29 100644 --- a/common/modules/dom.jsm +++ b/common/modules/dom.jsm @@ -691,6 +691,9 @@ var DOM = Class("DOM", { createContents: function createContents() this.each(DOM.createContents, this), + isScrollable: function isScrollable(direction) + this.length && DOM.isScrollable(this[0], direction), + getSet: function getSet(args, get, set) { if (!args.length) return this[0] && get.call(this, this[0]); @@ -1246,6 +1249,10 @@ var DOM = Class("DOM", { createContents: Class.Memoize(function () services.has("dactyl") && services.dactyl.createContents || function (elem) {}), + isScrollable: Class.Memoize(function () services.has("dactyl") && services.dactyl.getScrollable + ? function (elem, dir) services.dactyl.getScrollable(elem) & (dir ? services.dactyl["DIRECTION_" + dir.toUpperCase()] : ~0) + : function (elem, dir) true), + /** * The set of input element type attribute values that mark the element as * an editable field. |