mirror of
https://github.com/atom/atom.git
synced 2026-02-10 22:55:09 -05:00
Add $.fn.events, which returns a list of all handled events
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
$ = require 'jquery'
|
||||
_ = require 'underscore'
|
||||
|
||||
$.fn.scrollBottom = (newValue) ->
|
||||
if newValue?
|
||||
@@ -36,3 +37,10 @@ $.fn.trueHeight = ->
|
||||
|
||||
$.fn.trueWidth = ->
|
||||
this[0].getBoundingClientRect().width
|
||||
|
||||
$.fn.events = ->
|
||||
events = _.keys(@data('events') ? {})
|
||||
if @hasParent()
|
||||
events.concat(@parent().events())
|
||||
else
|
||||
events
|
||||
|
||||
Reference in New Issue
Block a user