code: function (offset) {
          var elm, doc, docElm;
          var x = 0, y = 0, pos;
  
          if (!offset) {
            elm = this[0];
  
            if (elm) {
              doc = elm.ownerDocument;
              docElm = doc.documentElement;
  
              if (elm.getBoundingClientRect) {
                pos = elm.getBoundingClientRect();
                x = pos.left + (docElm.scrollLeft || doc.body.scrollLeft) - docElm.clientLeft;
                y = pos.top + (docElm.scrollTop || doc.body.scrollTop) - docElm.clientTop;
              }
            }
  
            return {
              left: x,
              top: y
            };
          }
  
          return this.css(offset);
        }
docs: Returns the offset of the first element in set or sets the top/left css properties of all elements in set.
  
  @method offset
  @param {Object} offset Optional offset object to set on each item.
  @return {Object/tinymce.dom.DomQuery} Returns the first element offset or the current set if you specified an offset.