Method: Browser::DOM::Element#offset

Defined in:
opal/browser/dom/element.rb

#offsetOffset

Returns the offset of the element.

Returns:

  • (Offset)

    the offset of the element



308
309
310
311
312
313
314
315
316
# File 'opal/browser/dom/element.rb', line 308

def offset(*values)
  off = Offset.new(self)

  unless values.empty?
    off.set(*values)
  end

  off
end